Fixed guards spawning every time a player joins.#10
Fixed guards spawning every time a player joins.#10Switty6 wants to merge 4 commits intoFiveM-Scripts:rewritefrom
Conversation
pongo1231
left a comment
There was a problem hiding this comment.
In its current state it'll only run once after 500 ms of waiting. So if there are no players in the server when it runs it won't do anything at all. Also it'll only spawn the guards for the nearest safezone (if there's one) once and never again until either the resource or server restarts.
A better solution to the problem would be to find out what is causing clients to spawn guards again after they've been spawned already and fix the existing system involving entity decorators instead. These will make it easier for clients to communicate about spawned guards than using events.
Does the gamemode consistenly spawn additional guards for each player? Also what happens if a player far away teleports to another player who is very close to a safezone? Does that still spawn additional guards? If not I might have an idea as to why that happens and the existing system isn't able to prevent it from happening.
|
I forgot to put it in a loop. Dang it! The game mode spawns a guard for every player on the server. |
No description provided.