27.11.2012, 14:13
pawn Код:
//Countdown===========================================
new Count = 3;
new CountText[3][3] =
{
"3",
"2",
"1"
};//topo
//comando
if (strcmp(cmdtext, "/contar", true)==0){
if(pAdmin[playerid] > 0){
if(Count >= 3){
SendClientMessage(playerid, 0x33AA33AA, "(INFO) Contador й iniciado!");
CountDown();
return 1;
}
else
{
SendClientMessage(playerid, 0xAA3333AA, "(ERRO) Contador jб estб ativado!");
return 1;
}
}
}
forward CountDown();
public CountDown()
{
if (Count > 0)
{
SendClientMessageToAll(0x33AA33AA, CountText[Count-1]);
Count--;
SetTimer("CountDown", 1000, 0);
}
else
{
SendClientMessageToAll(0xFFFF00AA, "{FFFF00}Vai {FFFFFF}Vai {FFFF00}Vai");
Count = 3;
}
return 1;
}
..