SA-MP Forums Archive
update help - 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: update help (/showthread.php?tid=398909)



update help - MichaelWharton101 - 11.12.2012

I have the zGaming script and want to know how to update it so it will run faster and not lag when you /aduty, /ban etc


AW: update help - Kevin54321 - 11.12.2012

It isn`t easy to "update" it...
You can convert the saving system dini to mysql.
But it is not very easy!
https://sampforum.blast.hk/showthread.php?tid=337810

In general ...
pawn Код:
SetTimer("Clock", 1000, true);
    SetTimer("ADTimer", 1000, true);
    SetTimer("NOPSetPlayerPos", 1000, true);
    SetTimer("AltTabTimer", 1000, true);
    SetTimer("WeaponCheat", 1000, true);
    SetTimer("FuelTimer", 1000, true);
    SetTimer("PrisonTimer", 1000, true);
They are all started on the same time!
And than they are called the same time because every timer is set to 1000ms.
Maybe they are "small", then it may be okey ...
But if the timers are really "big" and if there are many operations in it it can lagg!
Maybe change the time of some timers:
prime! -> 991 983 1009 1013
The difference in 1 minute is about one second ... (1000ms +/- 20ms)
I would change these:
ADTimer,NOPSetPlayerPos,AltTabTimer,WeaponCheat,Fu elTimer.
Prison and Clock should be "exact".

Greetz
~ Kevin