How to remove the military?


#1

Is there a script to remove the police, and there is a script to remove the military?

Approximately this option

Citizen.CreateThread(function()
  while true do
    Citizen.Wait(0)
    local playerPed = GetPlayerPed(-1)
    local playerLocalisation = GetEntityCoords(playerPed)
    ClearAreaOfCops(playerLocalisation.x, playerLocalisation.y, playerLocalisation.z, 400.0)
  end
end)

#2

You can use the Enable_Dispatch_Service to control these

https://runtime.fivem.net/doc/reference.html#_0xDC0F817884CDD856

An example of this in Lua is

Citizen.CreateThread(function()
	while true do

        EnableDispatchService(1, true)
        EnableDispatchService(2, false)

        Citizen.Wait(0)
	end
end)

If the above usage of EnableDispatchService(dispatchService, bool) doesn’t work, you’ll need to try and use Citizen.InvokeNative(0xDC0F817884CDD856, dispatchService, bool)