Turning off wanted levels and AI dispatch on a FiveM server
In single-player GTA, shooting near a cop earns stars and a swarm of AI police. On a roleplay server that is exactly wrong: crime should be answered by real officers, not by the game. Turning the wanted system and AI dispatch off is one of the first scripts every roleplay server installs — and it is short.
Short answer: In a client script, call SetMaxWantedLevel(0), disable every dispatch service with EnableDispatchService(i, false) for services 1 to 15, stop random police with SetCreateRandomCops(false), and silence the scanner with SetAudioFlag('PoliceScannerDisabled', true). Clear any existing wanted level on spawn with ClearPlayerWantedLevel(PlayerId()).

#The complete script
CreateThread(function()
local player = PlayerId()
SetMaxWantedLevel(0)
ClearPlayerWantedLevel(player)
SetPoliceIgnorePlayer(player, true)
SetDispatchCopsForPlayer(player, false)
for service = 1, 15 do
EnableDispatchService(service, false)
end
SetCreateRandomCops(false)
SetCreateRandomCopsNotOnScenarios(false)
SetCreateRandomCopsOnScenarios(false)
SetAudioFlag('PoliceScannerDisabled', true)
DistantCopCarSirens(false)
end)The loop covers the game’s dispatch services — police cars, helicopters, boats, ambulances, fire trucks, army and more — so no AI unit is sent in response to anything.
#Keeping it off after respawn
Most of these settings persist for the session, but some scripts and events can reset them. Re-run the block when the player spawns (for example in your framework’s player-loaded event), and make sure no other resource sets a wanted level.
#Keeping some AI services
Some servers keep AI ambulances or fire trucks for atmosphere while removing police. Leave those services enabled in the loop. Keep the wanted level at 0 either way — stars are the trigger for AI police.
Questions
How do I disable the wanted level in FiveM?
SetMaxWantedLevel(0) in a client script, and ClearPlayerWantedLevel(PlayerId()) to remove any current stars.How do I stop AI police from responding?
EnableDispatchService(i, false) for 1 to 15 and turn off random cops with SetCreateRandomCops(false).How do I turn off the police scanner voice?
SetAudioFlag('PoliceScannerDisabled', true).Do I need this on a roleplay server?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.