Reduce NPC Traffic


#1

I was wondering what I could do to reduce NPC traffic. For no reason AI’s go crazy and start ramming other cars, mass spawn etc. I would rather not remove it but I would like to reduce it


Make much less npc vehicles
#2

Theres a thing called traffic density in settings, you can use a native to set it for everyone.


#3

Can you dumb that down for me… .-.


#4

I quickly made a script using the native functions that cover those settings for you, which also allows you to lower the pedestrian density.

-- From 0.0 to 1.0:
trafficDensity = 0.3
pedDensity = 0.3
Citizen.CreateThread(function()
	while true do
	    SetVehicleDensityMultiplierThisFrame(trafficDensity)
	    SetPedDensityMultiplierThisFrame(pedDensity)
	    SetRandomVehicleDensityMultiplierThisFrame(trafficDensity)
	    SetParkedVehicleDensityMultiplierThisFrame(trafficDensity)
	    SetScenarioPedDensityMultiplierThisFrame(pedDensity, pedDensity)
	    
	Citizen.Wait(0)
	end
end)

Hope it helps :stuck_out_tongue:


#5

which resource should i use with this? can u make the folders im gonna use?


#6

encontro algo para reducir el trafico amigo un saludo espero su repuesta ,gracias


#7

English please. You can find how to do that above, in my comment.