A lot of servers spawn their players in the same place ex. What in RP is called the job center.
When a player spawns in NPC/PED’s start spawning outside, and that fine not really an issue, but when the player is TP’ed to there last saved location, these NPC/PED’s become a problem.
Since they are not released, they end up being stuck to the owner player that caused them to spawn! So they become buggy, can’t die don’t move, and just stand still, so the more that joins the higher the PED/NPC count.
IF every player on the server is returned to the spawned PED/NPC’s THEY are RELEASED, and able to move again, and move away from the area.
So what I do believes happening, is the NPC/PED’s fails to migrate, and get stuck to there owner entity the player.
-
Client (Prod/Canary) and FXServer version
Both -
What you expected to happen
PED’s being released and moving away, later despawn like normal. -
What actually happens
PED’s freeze up, and bugs out. -
Category of bug (eg. client, server, weapons, Peds, native)
Server - Since this is not a thing in older FXServer versions NPC/PED’s -
Reproduceable steps, preferably with example script(s)
We tested out with a empty server, asked 6 players to join, they joined in spawned different places on the map, but just whent to the job center first, before selecting there char.
When they selected there char, more and more unresponsive PED’s pilled up outside.
What we then did was placing players different locations on the map, asked them to join again, the same issue happen, what I did then solved our mystery.
I tp’ed every player to me, when every player got in range of the NPC/PED’s they where released again.
We tested this 4 times, with the same result every single time.
What we did to migrate the issue for now until fixed, have 20 default spawn locations, when players are using our default ped, ClearAreaOfPeds and Vehicles run in a Thread with a while loop, when they change ped, this while loop will stop running, and stop Clearing area.
But this is a work around and a migration method not a fix.