21.01.2009, 18:31
in header:
OnGameCommandText:
In end of script:
pawn Код:
new cd_timer;
new cd_sec;
pawn Код:
if(strcmp(cmd,"/count",true)==0)
{
cd_sec = 5;
cd_timer = SetTimer("countdown", 999, 1);
return true;
}
pawn Код:
public countdown()
{
if(cd_sec == 0)
{
GameTextForAll("~r~Go!",1000,3);
KillTimer(cd_timer);
}
else
{
new string[8];
format(string,sizeof(string),"~g~%d",cd_sec);
GameTextForAll(string,1000,3);
}
cd_sec = cd_sec-1;
return 1;
}