SA-MP Forums Archive
Question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question (/showthread.php?tid=207664)



Question - [MWR]Blood - 06.01.2011

Hello, I've got a question.
When there are 5-10 people I don't lag, but when I got 25-30, sometimes I see others lagging and my chat also lags.
I asked people in the server do they lag, and 80% said that they do.
It wasn't lagging when I was on 0.3b
What could cause this lag?
Any help will be appreciated, thanks in advance.


Re: Question - Michael Bastos - 06.01.2011

in 0.3c there are many thing's update which takes up your ping. I also got that same problem. But after replacing everything in streamer, it's fixed


Re: Question - iggy1 - 06.01.2011

Sorry if i'm asking the obvious but, Do you have alot of stuff in "OnPlayerUpdate" or many repeating timers with alot of stuff in them (eg, vehicleloops, rangechecks ect) ?


Re: Question - [MWR]Blood - 06.01.2011

No, I have 5-10 lines in OnPlayerUpdate.
I've got one timer which respawns all vehicles every minute. I also have another timer which saves the players's stats every 3 seconds.
Maybe that's the problem?


Re: Question - iggy1 - 06.01.2011

The timer that saves the stats every 3 seconds is the culprit i'd say (if you mean saving to a file/database). Why not once every couple of mins? worst that could happen if server crashes is a couple of minutes of data is lost.