24.10.2017, 22:37
e so adaptar
Contagem
Contagem
Код:
new timer, contagem = 15;
public OnPlayerCommandText(playerid,cmdtext)
{
if(!strcmp(cmdtext,"/contagem",true))
{
timer = SetTimer("Contagem",1000,true);
return true;
}
return false;
}
forward Contagem();
public Contagem()
{
contagem--;
if(contagem > 0)
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
new string[30];
format(string,sizeof(string),"%i",contagem);
GameTextForPlayer(i, contagem,1000,0);
}
}
else
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
GameTextForPlayer(i,"GO",3000,0);
KillTimer(timer);
}
}
return true;
}

