18.02.2017, 12:09
I am making a countdown, but I cant stop the timer. I tried it with normal timers and y_timers.
PHP код:
new Timer:CountDownID[MAX_PLAYERS];
new counter[MAX_PLAYERS];
PHP код:
StartCounter()
{
foreach(Players, i)
{
counter[i] = 4;
CountDownID[i] = repeat CountDown(i);
}
}
PHP код:
timer CountDown[1000](playerid)
{
SendClientMessage(playerid, -1, "timer tick"); // This just keeps going
if(counter[playerid] != 0)
{
// counting down
}
else
{
GameTextForPlayer(playerid, "~g~START!", 1000, 4);
stop CountDownID[playerid]; // this wont stop the timer
}
}