25.01.2014, 12:41
plz give me the script of /countdown command
new timec;
CMD:countdown(playerid, params[])
{
if(sscanf(params, "i", timec)) return SendClientMessage( playerid, -1, "/countdown [time]" );
if((timec < 1) || (timec > 20)) return SendClientMessage(playerid, -1, "Time 20!");
TimerCont = SetTimer("DTime", 1000, true);
return 1;
}
public DTime()
{
if(timec == 0)
{
KillTimer(TimerCont);
GameTextForAll("~r~Go Go Go", 1000, 6);
return 1;
}
format(String, sizeof(String), "~g~%d", timec);
GameTextForAll(String, 1000, 6);
timec--;
return 1;
}