I have a question please. We would like to disable all NPCs and we use this code from here: [Release] Disable vehicles and peds from Ekrema. But a few NPCs will still spawn on the street (in vehicles), anyone have a idea?
Citizen.CreateThread(function()
while true
do
-- These natives has to be called every frame.
SetVehicleDensityMultiplierThisFrame(0.0)
SetPedDensityMultiplierThisFrame(0.0)
SetRandomVehicleDensityMultiplierThisFrame(0.0)
SetParkedVehicleDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
local playerPed = GetPlayerPed(-1)
local pos = GetEntityCoords(playerPed)
RemoveVehiclesFromGeneratorsInArea(pos['x'] - 500.0, pos['y'] - 500.0, pos['z'] - 500.0, pos['x'] + 500.0, pos['y'] + 500.0, pos['z'] + 500.0);
-- These natives do not have to be called everyframe.
SetGarbageTrucks(0)
SetRandomBoats(0)
Citizen.Wait(1)
end
end)
Its possible to disable all NPCs and maybe to activate animals?