Hello there! I am having this issue that I have to restart my [Release] Safe Zone(s) Updated 9/10/18 everytime some one joins the server because they are not affected by the zone. Is there a way in a server.lua to restart a loop in a client lua? or even in the client lua itself? Via a playerconnect event?
client scripts run on every client independently of any other clients scripts. It’s possible that clients could have an issue because you have started operations in the looping thread prior to the session becoming fully active?
Try to insert this as the first line above your while true do loop. I usually always include these on any threads in a client script to make sure the player is active in session first before executing code.
Citizen.CreateThread(function()
while not NetworkIsPlayerActive(PlayerId()) do
Citizen.Wait(0)
end
while true do
...
Interesting, ill give it a go!
next time please ask in the original topic of the resource.
Heard. Want to flag it and ill move it there?
i already flagged it, it happens just letting ya know