Killing timers for individual players?
#1

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?
Reply
#2

https://sampwiki.blast.hk/wiki/KillTimer

Read carefully.
Reply
#3

Quote:
Originally Posted by =WoR=Varth
Посмотреть сообщение
I readed, but it doesn't say anything bout specific players
Reply
#4

pawn Код:
new timer[MAX_PLAYERS];

// Somewhere
timer[playerid] = SetTimerEx(blabla

// Somewhere else
KillTimer(timer[playerid]);
Reply
#5

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
Reply
#6

Quote:
Originally Posted by iTorran
Посмотреть сообщение
pawn Код:
new timer[MAX_PLAYERS];

// Somewhere
timer[playerid] = SetTimerEx(blabla

// Somewhere else
KillTimer(timer[playerid]);
thanks a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)