EnableDispatchService dosen't work

Hello guys,

I’ve been trying to deactivate the emergency services, such as the police, the ambulance and the military, for a week.

I tested different scripts like:
How to remove the military?,
[RELEASE] Disable ALL Emergency Service and Military Dispatching,
GitHub - MasterZyper/mz_npc-spawn-control: Controls the spawning from NPCs in the World,
I don’t have a link for the following resources.
NoRewards, removeAIcops, removeAIServices, traficadjuster,
possibly these have also been renamed, the scripts have been sent to me.

I tested them all, with and without ESX, with and without Essentialmode. Also in the Windows and Linux version.

I also changed the server version. 5012 (Latest Version) → 4478 (Latest Optinal Version) → 4394 (Latest Recommended Version).

But it didn’t really work, in a few scripts the cops were removed but the police cars weren’t. But it never affected the gangs, the ambulances, or the military.

Can any of you give me a tip as to why this could be?
Does it have something to do with the standard scripts that come with the server data. (mapmanager, chat, spawnmanager, sessionmanager, basic-gamemode, hardcap)

Kind regards
Raphael

i Use this client sided

Citizen.CreateThread(function()
    StartAudioScene("CHARACTER_CHANGE_IN_SKY_SCENE")
    SetAudioFlag("PoliceScannerDisabled", true)
    while true do
	    local playerPed = PlayerPedId()
		local pos = GetEntityCoords(playerPed) 
		SetGarbageTrucks(0)
		SetCreateRandomCops(0)
		SetCreateRandomCopsNotOnScenarios(0)
		SetCreateRandomCopsOnScenarios(0)
		DistantCopCarSirens(0)
		CancelCurrentPoliceReport()
		RemoveVehiclesFromGeneratorsInArea(335.2616 - 300.0, -1432.455 - 300.0, 46.51 - 300.0, 335.2616 + 300.0, -1432.455 + 300.0, 46.51 + 300.0) -- central los santos medical center
		RemoveVehiclesFromGeneratorsInArea(441.8465 - 500.0, -987.99 - 500.0, 30.68 -500.0, 441.8465 + 500.0, -987.99 + 500.0, 30.68 + 500.0) -- police station mission row
		RemoveVehiclesFromGeneratorsInArea(316.79 - 300.0, -592.36 - 300.0, 43.28 - 300.0, 316.79 + 300.0, -592.36 + 300.0, 43.28 + 300.0) -- pillbox
		RemoveVehiclesFromGeneratorsInArea(-2150.44 - 500.0, 3075.99 - 500.0, 32.8 - 500.0, -2150.44 + 500.0, -3075.99 + 500.0, 32.8 + 500.0) -- military
		RemoveVehiclesFromGeneratorsInArea(-1108.35 - 300.0, 4920.64 - 300.0, 217.2 - 300.0, -1108.35 + 300.0, 4920.64 + 300.0, 217.2 + 300.0) -- nudist
		RemoveVehiclesFromGeneratorsInArea(-458.24 - 300.0, 6019.81 - 300.0, 31.34 - 300.0, -458.24 + 300.0, 6019.81 + 300.0, 31.34 + 300.0) -- police station paleto
		RemoveVehiclesFromGeneratorsInArea(1854.82 - 300.0, 3679.4 - 300.0, 33.82 - 300.0, 1854.82 + 300.0, 3679.4 + 300.0, 33.82 + 300.0) -- police station sandy
		RemoveVehiclesFromGeneratorsInArea(-724.46 - 300.0, -1444.03 - 300.0, 5.0 - 300.0, -724.46 + 300.0, -1444.03 + 300.0, 5.0 + 300.0) -- REMOVE CHOPPERS WOW
    	Citizen.Wait(10)
	end
end)
1 Like

Hello Weird_Foxey,

Thank you for your answer.

Unfortunately your function did not bring the hoped-for success …

I have attached both scripts for how I used your code. Maybe I made a mistake while creating or inserting it.

If necessary, you or someone else can help me again.

Best regards
Raphael

This is a code without extra lines, this led to the fact that the client stopped at “awaiting scripts”.
RemoveAIService.zip (1.3 KB)

This is the resource that I added to your code.
norewards.zip (2.7 KB)

GitHub - Weird-Foxey/Foxey-basics: just a basic Fivem plugin here you go, i will add disabling weapon drop and disabling weapon reward soon

Thanks for sharing your code, are there any server-side requirements?
I have tested the resource on my 3 test servers (version 5039, 4478, 4394).
Unfortunately, I couldn’t get it to work on this server with the resources required by default
(mapmanager, chat, spawnmanager, sessionmanager, basic-gamemode, hardcap).