SA-MP Forums Archive
Timeouts & Lag - GetServerTickRate - 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: Timeouts & Lag - GetServerTickRate (/showthread.php?tid=625872)



Timeouts & Lag - GetServerTickRate - FunnyBear - 07.01.2017

Hello there,

I have recently come across a problem which I cannot seem to find the answer for. I've had complaints of lag and timeouts which I've witnessed myself when two or more players are online.

I asked someone to go on the server, they said they experienced no lag, but as soon as I connect, they start lagging and eventually they timeout after a couple of minutes.

Taken from the log -
Code:
[18:01:03] The current server tick rate is: 175
[18:01:03] [login] ****** has logged into their account
[18:01:04] The current server tick rate is: 97
[18:01:05] The current server tick rate is: 174
[18:01:06] The current server tick rate is: 166
As you can see, there is a change/decrease in the tick rate when a user logs into their account. This also happened when I logged in.


Re: Timeouts & Lag - GetServerTickRate - SickAttack - 07.01.2017

If the lag is only when a user connects, it will help to check OnPlayerConnect, remove parts of the code and try to find what's causing the lag.


Re: Timeouts & Lag - GetServerTickRate - FunnyBear - 07.01.2017

The lag starts when the second player connects to the server, it doesn't stop after that: it just continues. However, I'll be sure to check if anything unusual is under OnPlayerConnect.

Any other suggestions?


Re: Timeouts & Lag - GetServerTickRate - SickAttack - 08.01.2017

Maybe it's caused by something in a timer. It can be anything really, you're the one who should know however as you're the one who created the script.


Re: Timeouts & Lag - GetServerTickRate - IstuntmanI - 08.01.2017

I recommend you to use this: https://sampforum.blast.hk/showthread.php?tid=271129

It helps a lot.