01.02.2015, 17:22
I searched for a tutiroal to make a count down but i as i want to learn not to copy i want to ask some question
PHP код:
new countdown = 5;
new countTime;
PHP код:
CMD:countdown(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_RED, "Command not found on the server! /help");
countTime = SetTimer("CountDownTimer",1000,false); //Here he put thre timer and made the repeting "False" ok.
return 1;
}
public CountDownTimer()
{
countdown--; //Here he decreases the the count down by one but he set the repete "False" so it will apear "4" and stop correct me if ia m right .
new string[128];
if(countdown == 0)
{
KillTimer(countTime);
countdown = 5;
}
else
{
format(string,sizeof(string),"%d",countTime);
GameTextForAll(string,1000,1);
}
return 1;
}