01.12.2018, 16:39
try this
pawn Код:
ACMD:criarevento[1](playerid, params[])
{
if(sscanf(params, "i", params[0]))
return Msg(playerid, NovoA, "[ > ] Uso correto: /evento [tempo] (1000 = 1 Segundo)");
inserttime = params[0]/1000;
timer = SetTimer("Countdownregressive", 1000, true);
return 1;
}
forward Countdownregressive();
public Countdownregressive()
{
inserttime--;
if(inserttime == 0)
{
KillTimer(timer);
inserttime = 0;
}
else
{
new string[240];
format(string, sizeof(string), "~y~O Evento sera iniciado em: ~g~%d~n~~y~Guarde seus ITENS!", inserttime);
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)
{ GameTextForPlayer(i, string, 1000, 5); }
}
return 1;
}