09.08.2011, 13:02
pawn Код:
public CountDown(cd, number)
{
if(CountDownOn == 1)
{
new string[128];
format(string, sizeof(string), "%d", cd);
GameTextForAll(string, 1000, 3);
if(cd > 0)
{
cd--;
CountDownTimer = SetTimerEx("CountDown", 1000, 0, "%d", cd);
}
else
{
if(number == 0)
{
GameTextForAll("~g~GO!!!", 3000, 3);
CountDownOn = 0;
}
else
{
GameTextForAll("~g~GO!!!", 3000, 3);
CountDownOn = 0;
KillTimer(CountDownTimer);
ToggleAllPlayersControllable(1);
}
}
}
}