I have a problem with duplicating NPCs and double vehicles when there are multiple players in the server, they are duplicated every time, like there is a double spawn request from them, I still haven’t been able to find a solution, does anyone know how to do it?
Most likely a script issue.
If your talking about how at time a abundance of cars spawn in the same spot like in the city over and over for no reason, because I’ve had this issue in the past and I just used ped density to remove peds all together it helps with frames and is a lot better for the server all around
The problem is slightly more complex, but I managed to solve it somehow, thanks for your interest!
Local pedSpawned = false (normal condition without npc)
if pedSpawned then return end
Spawn NPC code blah blah blah
pedSpawned = true
How you do it? I have the same issue
It’a networking issue, basically any time a player joins, a ped is created with “isnetwork” param as true. Either disable that param or move creation of ped/vehicle to server only at the start of the script