Laggy game.. - 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: Laggy game.. (
/showthread.php?tid=430241)
Laggy game.. -
dorperez - 13.04.2013
Hey guys..
My GM is laggy and I don't know why..every time I am moving by car or by foot and writing something in the chat to check if there are lags it takes more than 10 seconds to show what I wrote..
Its not because the ojects because I tried to put them in another GM,like my GM to check if its the objects but it worked great without any lags..
Can someone help me please ?
Re: Laggy game.. -
Isolated - 13.04.2013
Check for array sizes etc... Everything code wise can cause lag, so try to make sure everything is necessary, for example
pawn Код:
new String[1000];
format(String, sizeof(String), "DUDE WTF? %d", playerid);
SendClientMessage(playerid, -1, String);
That just isn't needed, and will cause lag, if repeated to much
Re: Laggy game.. -
dorperez - 13.04.2013
Quote:
Originally Posted by MikeLovesToHelp
Check for array sizes etc... Everything code wise can cause lag, so try to make sure everything is necessary, for example
pawn Код:
new String[1000]; format(String, sizeof(String), "DUDE WTF? %d", playerid); SendClientMessage(playerid, -1, String);
That just isn't needed, and will cause lag, if repeated to much
|
But I have 60000+ lines bro :\
Re: Laggy game.. -
Isolated - 13.04.2013
It's just an example, it's your choice if you use it or not. Just something to make sure you look for.
Re: Laggy game.. -
JaKe Elite - 13.04.2013
You whether use a slow saving system.
You use high cell sizes.
To many vars.
Using a timer that repeats but you've not never killed them.
That's all i know.
I have also experience this problem on my old server. So i decided to convert it back to new script one by one.
And fixing the code. using KillTimer on the repeating timer. And use YINI instead of dini.
One tip. Try to fix all of the codes and check if there is any changes. It will take a while to fix the lag.