06.05.2015, 10:03
PHP код:
stock CountDown(playerid, time)
{
CountDownTime[playerid] = time;
CTimer[playerid] = SetTimerEx("CountDownTimer", 1000, true, "i", playerid);
return 0;
}
forward CountDownTimer(playerid);
public CountDownTimer(playerid)
{
new timer[28];
format(timer, sizeof(timer), "%i Seconds", CountDownTime[playerid]);
GameTextForPlayer(playerid, timer, 1000, 3);
if(!(--CountDownTime[playerid]))
{
GameTextForPlayer(playerid, "~g~GOOOOO!!!!", 1000, 3);
KillTimer(CTimer[playerid]);
CTimer[playerid] = -1;
}
return 1;
}