Players desync after 15-20 minutes of playing - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Players desync after 15-20 minutes of playing (
/showthread.php?tid=655263)
Players desync after 15-20 minutes of playing -
ElMaestro123 - 17.06.2018
Hi guys, I've noticed that some players with slower internet desync without a decent reason, also I found out that the host isn't a problem for it.
Re: Players desync after 15-20 minutes of playing -
Kane - 17.06.2018
What's your question? If it's "why", you answered it yourself.
Re: Players desync after 15-20 minutes of playing -
ElMaestro123 - 17.06.2018
The slow bandwidth shouldn't be the cause. I remember playing on LSRP with same speed of internet and having stable gameplay for 8hours+ without relogging/etc.
I was asking if anyone experienced similar things and what did he do to solve it.
Re: Players desync after 15-20 minutes of playing -
Dignity - 17.06.2018
Revise your script.
Do you use a lot of timers, ticks, ..?
If so, there's your answer.
Also inefficient code on a large scale also causes this.
Re: Players desync after 15-20 minutes of playing -
ElMaestro123 - 17.06.2018
I am using 3 timers in 3seconds period. One is called every 3000ms and it performs anticheat checks for each player, there's also one fast timer, called every 400ms that also does foreach checks, etc... What about memory? Will lowering MAX_PLAYERS and other array sizes make script more lightweight or it doesn't have anything to do with script performance?
Re: Players desync after 15-20 minutes of playing -
Dignity - 17.06.2018
You can try it. You can run the performance plugin too but you should probably get some information on when the desync occurs so you can pinpoint it better.