29.06.2012, 20:56
Hello, I wonder how to do a SetTimerEx and the kill it again? I don't want to place the timer in the public scope becuse i want different timers for each player when they call my function.
It's like :
(notice that's not the code it's just a thing i made to get you to understand my problem)
Thanks for all answers!
It's like :
Код:
New TimerCounter[MAX_PLAYERS];
YCMD:starttimer(){
TimerCounter[playerid] = SetTimerEx("Timer", 1000, true, "i", playerid);
}
Public Timer(playerid){
if(timercounter[playerid] < 10){
SendClientMessage(playerid, COLOR_YELLOW, "Timer have passed one scound");
TimerCounter[playerid] ++;
}
else{
SendClientMessage(playerid, COLOR_YELLOW, "Ten secounds have now passed and the timer have been killed");
}
}
Thanks for all answers!



