How can i remove all NPC from server?

You have some natives for this like
SetVehicleDensityMultiplierThisFrame() and SetPedDensityMultiplierThisFrame()

Example:

Citizen.CreateThread(function()
	while true do
	    Citizen.Wait(0)
	    SetVehicleDensityMultiplierThisFrame(0.0) -- removes people walking around
        SetPedDensityMultiplierThisFrame(0.0) -- remove vehicles driving
	end
end)

And as you can see no AI :smile:

1 Like