This script disables Wanted Levels for all players serverwide, so you won’t have to deal with players who didn’t turn on Never Wanted on a trainer. Great for RP servers.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if GetPlayerWantedLevel(PlayerId()) ~= 0 then
SetPlayerWantedLevel(PlayerId(), 0, false)
SetPlayerWantedLevelNow(PlayerId(), false)
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if GetPlayerWantedLevel(PlayerId()) ~= 0 then
SetPoliceIgnorePlayer(player, true)
SetDispatchCopsForPlayer(player, false)
end
end
end)
There you go, You can get stars, but police will not spawn.
Can somebody make sure that the stars do not disappear after 1 min.?
@UncleBoss the stars do eventually disappear, not sure if it’s one minute though. I will have the wanted level set to trigger a chat message " player name has a wanted level of X stars in (insert location here). So as long as the on duty police see the CAD call they will pursue.
@UncleBoss try using playerId instead of player. I can’t confirm if that’s a fix, as all the testing I do on my server is on my PC and by myself. So if you could test it, would be good to know.
@Anarchy_Rising I didn’t use the local player = playerId(). I used SetPoliceIgnorePlayer(playerId(), true)
SetDispatchCopsForPlayer(playerId(), false).
I used Mr.scammers format changing a few lines. Will test tonight with multiple players.