Killing timers for individual players? - 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: Killing timers for individual players? (
/showthread.php?tid=316047)
Killing timers for individual players? -
milanosie - 05.02.2012
Hey, How do I kill TimerEX that run for individual players? I mean, I dont want to kill the timer for every player, only for one.
Will KillTimer do this?
Or will I need to write something with ForEach where it selects everybody except the player?
Re: Killing timers for individual players? -
=WoR=Varth - 05.02.2012
https://sampwiki.blast.hk/wiki/KillTimer
Read carefully.
Re: Killing timers for individual players? -
milanosie - 05.02.2012
Quote:
Originally Posted by =WoR=Varth
|
I readed, but it doesn't say anything bout specific players
Re: Killing timers for individual players? -
iTorran - 05.02.2012
pawn Код:
new timer[MAX_PLAYERS];
// Somewhere
timer[playerid] = SetTimerEx(blabla
// Somewhere else
KillTimer(timer[playerid]);
Re: Killing timers for individual players? - T0pAz - 05.02.2012
pawn Код:
new MyTimer[MAX_PLAYERS]; // Declare the array variable with MAX_PLAYERS as the size
MyTimer[playerid] = SetTimerEx(...); // Create the timer for the player
KillTimer(MyTimer[playerid]); //Kill the timer for the player
Re: Killing timers for individual players? -
milanosie - 05.02.2012
Quote:
Originally Posted by iTorran
pawn Код:
new timer[MAX_PLAYERS];
// Somewhere timer[playerid] = SetTimerEx(blabla
// Somewhere else KillTimer(timer[playerid]);
|
thanks a lot