Posts: 1,506
Threads: 69
Joined: Feb 2008
I'd really need such function, Is there any such function, or a stock function somewhere?
Posts: 1,506
Threads: 69
Joined: Feb 2008
Sorry, but your answer did not solve my problem.
(I'm not a n00b, i could figure the above by myself, If I needed that).
If you know what SetTimerEx does, I'd like the same options for KillTimer.
Which is, kill the timer for a specific player ID only.
Posts: 39
Threads: 7
Joined: Jan 2010
Reputation:
0
yes it is so you do like this
new timer[MAX_PLAYERS];
timer[playerid] = SetTimerEx("fnc", 2000, true, "i", playerid);
KillTimer(timer[playerid]);
that will kill timer for just specific ID !
Posts: 1,506
Threads: 69
Joined: Feb 2008
Quote:
Originally Posted by (.Aztec);
Well, my knowledge is flawed then. I thought it would kill it, but I was wrong, I spose.
|
It would kill It, but It is for several players. So If It the timer was used by someone else at the same time, It would stop It for them too, which would cause problems.
Posts: 1,506
Threads: 69
Joined: Feb 2008
Quote:
Originally Posted by ivex
yes it is so you do like this
new timer[MAX_PLAYERS];
timer[playerid] = SetTimerEx("fnc", 2000, true, "i", playerid);
KillTimer(timer[playerid]);
that will kill timer for just specific ID !
|
Yeah I thought of that,
but hey, I just thought of something else (Yes I always seem to find solutions to my problems when I ask for It..)
It's made like this;
pawn Code:
forward Timer(playerid);
SetTimerEx("Timer",milliseconds,0,"i",playerid);
So would KillTimer(Timer(playerid)); stop it for that player only?
It compiles fine so, I just wondered.
Posts: 1,954
Threads: 79
Joined: Aug 2009
Reputation:
0
I don't believe KillTimer is working with only-forwarded timers,you need to create a separated variable for each timer.
Like JaTochNietDan said,use ivex's code.