09.10.2015, 16:24
PHP Code:
new CountDownSeconds, CountDownMinutes, CountDownTimer;
CountDownSeconds = 60;
CountDownMinutes = 5;
CountDownTimer = SetTimer("CountDownTimer", 999, 1);
forward CountDownTimer();
public CountDownTimer()
{
CountDownSeconds--;
if(CoundDownSeconds == 0)
{
CountDownMinutes--;
CountDownSeconds = 60;
}
new string[128];
format(string, 128, "%d:%d", CountDownMinutes, CountDownSeconds);
TextDrawSetString(Text:MissionCount, string);
TextDrawShowForAll(Text:MissionCount);
if (CountDownMinutes == 0)
{
GameTextForAll("", 3000, 5);
KillTimer(CountDownTimer);
}
return 1;
}