Skip to content

Commit

Permalink
Added blacklisted scope weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
NeenGame committed Aug 9, 2023
1 parent b645537 commit 18e3d3a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 21 deletions.
59 changes: 40 additions & 19 deletions client.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
BlackListedWep = {
'weapon_sniperrifle',
'weapon_heavysniper',
'weapon_heavysniper_mk2',
'weapon_marksmanrifle',
'weapon_marksmanrifle_mk2',
'weapon_precisionrifle',
}

CreateThread(function()
while true do
local ped = PlayerPedId()
Expand All @@ -7,30 +16,42 @@ CreateThread(function()
local CamPos = GetFollowPedCamViewMode()
local CamPosVeh = GetFollowVehicleCamViewMode()
local isinveh = IsPedInAnyVehicle(ped, false)
local Weapon = GetSelectedPedWeapon(ped)
if armed(ped, 1) or armed(ped, 2) or armed(ped, 4) then
if not isinveh and CamPos == 0 and CamFov > 60.2 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFov)
elseif not isinveh and CamPos == 4 and CamFov > 58.0 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFov)
elseif CamFov < 31.7 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFov)
elseif isinveh then
local veh = GetVehiclePedIsUsing(ped)
if CamPosVeh == 4 and CamFovCar > 60.6 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFovCar)
elseif CamPosVeh == 0 or CamPosVeh == 1 or CamPosVeh == 2 then
if GetVehicleClass(veh) == 8 then
if CamFovCar > 62.6 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFovCar)
end
else
if CamFovCar > 60.2 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFovCar)
if not isWeaponBlacklisted(Weapon) then
if not isinveh and CamPos == 0 and CamFov > 60.2 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFov)
elseif not isinveh and CamPos == 4 and CamFov > 58.0 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFov)
elseif CamFov < 31.7 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFov)
elseif isinveh then
local veh = GetVehiclePedIsUsing(ped)
if CamPosVeh == 4 and CamFovCar > 60.6 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFovCar)
elseif CamPosVeh == 0 or CamPosVeh == 1 or CamPosVeh == 2 then
if GetVehicleClass(veh) == 8 then
if CamFovCar > 62.6 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFovCar)
end
else
if CamFovCar > 60.2 then
TriggerServerEvent('neen-antiflawless:server:kick:vinka', CamFovCar)
end
end
end
end
end
end
Wait(1500) --- wait
end
end)
end)

function isWeaponBlacklisted(hash)
for _, blacklistedWeapon in pairs(BlackListedWep) do
if hash == GetHashKey(blacklistedWeapon) then
return true
end
end
return false
end
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5'

author 'NeenGame'
version "0.1.1"
version "0.1.2"
description 'neen-antiflawless is a game-changing FiveM script designed to uphold fairness and integrity in gameplay by putting an end to the exploitation of flawless widescreen configurations and FOV abuse.'
lua54 'yes'

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.1.2

0 comments on commit 18e3d3a

Please sign in to comment.