NPC no longer spawn in street

There is only very few cars spawning with NPC in them, And there is No NPCs walking around, any fix to this

You probably have some script messing with it. Try to do a text lookup for natives such as SetPedDensityMultiplierThisFrame and SetVehicleDensityMultiplierThisFrame

is this looking through server.lua?

1 Like

Those natives are ran on the client side. Use VSCode or something similar to look through all the .lua files of your server’s resources at once for those natives being used - that’s what I referred to as a “text lookup”. At that point you should be able to see which file(s) are messing with it and adjust the lines accordingly.

    -- These natives have to be called every frame.
    SetPedDensityMultiplierThisFrame(0.0)-- set npc/ai peds density to 0
    SetRandomVehicleDensityMultiplierThisFrame(0.5)-- set random vehicles (car scenarios / cars driving off from a parking spot etc.) to 0
    SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)-- set random npc/ai peds or scenario peds to 0
    SetGarbageTrucks(false)-- Stop garbage trucks from randomly spawning
    SetCreateRandomCops(false)-- disable random cops walking/driving around.
    SetCreateRandomCopsNotOnScenarios(false)-- stop random cops (not in a scenario) from spawning.
    SetCreateRandomCopsOnScenarios(false)-- stop random cops (in a scenario) from spawning.

this is the only one in assets-fivem file

And as you can see, it sets PedDensity to 0.0 (none) and stuff. Comment out some of those lines (or change it back to 1.0 ) and peds etc will start spawning as usual.

I changed it and nothing happened

i dont have this natives in my base… my base was good but i dont know, now i dont have cars and npcs in street… i make all my new and old scripts off and nothing!!!

my problem maybe is this i think i put true for this OMG!
““Your last option is to enable onsync infinity that will remove all traffic and peds””