SA-MP Forums Archive
foreach or per player 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: foreach or per player timers ? (/showthread.php?tid=621343)



foreach or per player timers ? - NeXoR - 09.11.2016

Hey guys, what would be, in your opinion, more efficient
When a player gets jailed/muted a timer is called
Or simply run a static timer ongamemodeinit and foreach all players there


Re: foreach or per player timers ? - AbyssMorgan - 09.11.2016

Foreach


Re: foreach or per player timers ? - Vince - 09.11.2016

I don't think there will be a huge difference, honestly. On one side you have the overhead of the loop and on the other side you have the overhead of the timer.


Re: foreach or per player timers ? - SickAttack - 09.11.2016

Per-player timers.