SA-MP Forums Archive
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)
+---- Forum: Discussion (https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Timers. (/showthread.php?tid=650394)



Timers. - wallen - 26.02.2018

Settimer and SettimerEx, if used often will it lead somehow to a server crash? is it the same like having too much scripts on callback "onplayerupdate" ?, because i'am currently working on a auto-save system that saves your stats to mysql without losing it on a server restart or crash.


Re: Timers. - DTV - 26.02.2018

If you're worried about people losing their stats due to a crash or restart, save a player's stats when they actually change rather than making a timer to have it save every 5 minutes.


Re: Timers. - PepsiCola23 - 27.02.2018

Quote:
Originally Posted by DTV
View Post
If you're worried about people losing their stats due to a crash or restart, save a player's stats when they actually change rather than making a timer to have it save every 5 minutes.
exactly,why would you auto-save its stats every 1 minute or so.Imagine having 1000/1000 players. Just update them when stats that matter are modified(money,level etc )


Re: Timers. - Sew_Sumi - 27.02.2018

If the timer is used badly, and structured so it makes the script stall, then it will cause problems.

Doesn't matter how often you fire the timer, it's about its efficiency.


Re: Timers. - wallen - 27.02.2018

Thanks, i've got a clear point now