14.12.2010, 14:38
It is bugged =/ i can compile it, but nothing happends
pawn Код:
#include <a_samp>
new count;
forward Count(playerid);
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/countdown", cmdtext, true, 10) == 0)
{
count = SetTimer("Count", 1000, false);
SendClientMessage(playerid, 0x94FF00FF, "Countdown started");
return 1;
}
return 0;
}
pawn Код:
public Count(playerid)
{
new counter = 120, string[10];
counter--;
format(string, sizeof(string),"~b~%d", counter);
GameTextForPlayer(playerid, string, 300, 3);
if(counter == 0)
{
format( string, sizeof(string), "~g~2 minutes have passed!!!");
GameTextForPlayer(playerid, string, 300, 3);
KillTimer(count);
}
return 1;
}