question about timers. - 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: question about timers. (
/showthread.php?tid=399708)
question about timers. -
PaulDinam - 15.12.2012
They are lagging the server?
Re: question about timers. -
Djole1337 - 15.12.2012
Depends.
Re: question about timers. -
Mean - 15.12.2012
If you have a lot of complex stuff in it and if it gets executed too often - yes.
Having a lot of timers isn't good either. I suggest you use UNIX timestamps for cooldowns and such to reduce the number of timers in the script. There are tons of tutorials on UNIX timestamps in these forums.
Re: question about timers. -
electrux - 15.12.2012
Depends on your computer power and the refresh rate of timers (the time in which it repeats itself).
Re: question about timers. -
Konstantinos - 15.12.2012
As Mr_DjolE said, it depends. Using a lot of timers will cause server-lag especially, if they execute at the same time, and you should use timestamps in anything can be replaced the timer. By the way, I've read that it's better to use more timers with less code inside, instead of a timer with too many code inside.