SetTimer and SetTimerEx
#1

I've alot of doubts related to these two functions and wiki is not helping. Id 0 plays a role in it too, why I think that is because I tested it months ago.

Lets say we've a timer

Code:
SetTimer("Function",5000,1);
Q1. Is the timer looping through all players ?
Q2. Is the timer looping through only ID 0 ?
Q3. If ID 0 logs out will it stop working ?


Now if we look at this timer, here we attach a global variable:

Code:
new global;
global = SetTimer("Function",5000,1);
Q4. Is the timer looping through all players ?
Q5. Is the timer looping through only ID 0 ?
Q6. If ID 0 logs out will it stop working ?
Q7. What difference it would make when if we equal it to a localvar (new localvar[MAX_PLAYERS]) ?

What I think is, when you equal a global or player (new playervar[MAX_PLAYERS]) var with a timer it usually is to kill a timer when a specific condition is reached if I'm not wrong.

Have a look at SetTimerEx now:
Code:
 SetTimerEx("Function2", 5000, false, "i", playerid);
Q8. Is the timer looping through all players or just the specific player?
Q9. If we equal it to a global or local var (new localvar[MAX_PLAYERS]) what difference it can possibly make rather than stopping when a condition is reached ?


I would really appreciate if someone clarify these questions.
Reply


Messages In This Thread
SetTimer and SetTimerEx - by Penguin1997 - 14.08.2016, 20:39
Re: SetTimer and SetTimerEx - by Vince - 14.08.2016, 20:56
Re: SetTimer and SetTimerEx - by Penguin1997 - 15.08.2016, 10:50
Re: SetTimer and SetTimerEx - by Stinged - 15.08.2016, 11:46
Re: SetTimer and SetTimerEx - by Logic_ - 15.08.2016, 15:40
Re: SetTimer and SetTimerEx - by Penguin1997 - 15.08.2016, 16:18
Re: SetTimer and SetTimerEx - by Stinged - 15.08.2016, 17:26
Re: SetTimer and SetTimerEx - by Kar - 18.08.2016, 00:30
Re: SetTimer and SetTimerEx - by Mister0 - 19.08.2016, 11:28
Re: SetTimer and SetTimerEx - by WhiteGhost - 19.08.2016, 12:06

Forum Jump:


Users browsing this thread: 1 Guest(s)