Hello, this little code makes all weapons be deleted if you jump in a car, you cant bug it to get a weapon or something.
Citizen.CreateThread(function()
while true do Citizen.Wait(100)
if IsPedInAnyPoliceVehicle(GetPlayerPed(-1), -1) or IsPedInAnyHeli(GetPlayerPed(-1)) then
DisablePlayerVehicleRewards(GetPlayerPed(-1))
end
end
end)
Just add this to client.lua in policejob or any other script.
local whitelistedmodels = {
"modelnamehere"
}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsPedInAnyVehicle(PlayerPedId(), true) and not isCarBlacklisted(GetVehiclePedIsUsing(PlayerPedId())) then
DisablePlayerVehicleRewards(PlayerPedId())
end
end
end)
function isCarBlacklisted(model)
for _, blacklistedCar in pairs(whitelistedmodels) do
if model == GetHashKey(blacklistedCar) then
return false
end
end
return true
end
didn’t have time to try this, so it may or may not work, but this way you should able to exclude the models you wanna get rewards from
model names may have to be in all caps
(also the function is partially from @pongo1231 's vehicle blacklist script, thank you @pongo1231 )