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.
Download is here.
- Go to your server directory
- Open up your citmp-server.yml
- At the buttom of the AutoStartResources, add:
- Open your resources directory
- Extract the downloaded zip into this directory
- Turn on the server and enjoy the silence
while true do
if GetPlayerWantedLevel(PlayerId()) ~= 0 then
SetPlayerWantedLevel(PlayerId(), 0, false)
Please also put code here.
Great Script! Keep it up!
You could have just only used this instead without a loop.
Huh, I tried this at the beginning and it didn’t work. I must have had a typo when writing it then.
Edit: Just tried it out, it doesn’t work.
any way to just make the police despawn or still have a wanted level like SetPoliceIgnorePlayer but still have stars? So we can use arrest script
Sorry for the thread necro, but you can accomplish that by using
local player = PlayerId()
The cops will ignore the player and not dispatch after you for crimes, but the wanted levels remain.
how the script look then? I have been looking for a way to keep wanted levels in and just disable the ai cops so how would that script work?
@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.
If you want the wanted level to stay until manually reset, you could probably use the native function–
SetPlayerWantedLevelNoDrop(player, curWantedLevel, false)
Though I haven’t used that function yet at all.
Okey thank you, there is only one problem left, this script only applies for the first joined user.
@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.
Yeah sorry, I was ‘extending’ the script in your previous post. Sometimes things that make sense in my own head don’t make sense to others.
local player = PlayerId()
Try calling those functions after the player has loaded and spawned too. Do you use essentialmode by chance @Uncleboss?
@Anarchy_Rising I didn’t use the local player = playerId(). I used SetPoliceIgnorePlayer(playerId(), true)
I used Mr.scammers format changing a few lines. Will test tonight with multiple players.
No, i don’t use essentialmode, why?
Doesn’t work for me, about 1 min and 20 sec after committing the stars disappear.
@UncleBoss If you don’t mind me asking. Why do you need the stars to remain?
@HST it’s already in the essentialmode??