19.12.2009, 12:45
good job
![Cheesy](images/smilies/biggrin.png)
![Wink](images/smilies/wink.png)
![Smiley](images/smilies/smile.png)
![cheesy](images/smilies/lol.gif)
new counts; forward timer1(); new counter1;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/count", cmdtext, true, 10) == 0)
{
if(countspam[playerid]==0)
{
counts = 6;
counter1 = SetTimer("timer1",1000,true);
// SetTimer("countspam2",120000,0); Optional.
}
else
{
SendClientMessage(playerid,COLOR_BLUE, "Please wait before using this Command again.");
}
return 1;
}
return 0;
}
public timer1()
{
counts--;
if(counts == 5)
{
GameTextForAll("5",2000,3);
}
if(counts == 4)
{
GameTextForAll("4",2000,3);
}
if(counts == 3)
{
GameTextForAll("3",2000,3);
}
if(counts == 2)
{
GameTextForAll("2",2000,3);
}
if(counts == 1)
{
GameTextForAll("1",2000,3);
}
if(counts == 0)
{
GameTextForAll("~w~GO!",2000,3);
KillTimer(counter1);
}
return 1;
}