19.05.2014, 19:45
Hi guys i have make this countdown system:
on my command:
BUT on game when type the command then i see a gametext which writes: countdown 19 and it still there for some seconds and then disapear!!
whats wrong
some help please
PHP код:
new CountDownVar = 15;
new CountDownTimer;
PHP код:
CountDownTimer = SetTimer("CountDown" ,1000, false);
PHP код:
forward CountDown(playerid);
public CountDown(playerid)
{
CountDownVar--;
new str[128];
if(CountDownVar == 0)
{
KillTimer(CountDownTimer);
CountDownVar = 15;
}
else
{
GameTextForPlayer(playerid, "Count Down: %d", CountDownTimer, 8000, 1);
//format(str, sizeof(str), "Count Down: %d", CountDownTimer);
//GameTextForPlayer(str, 1000, 1);
}
return 1;
}
whats wrong
