09.10.2014, 21:52
Simples cara, vк o link do amigo acima, logo pense como montar...
pawn Код:
new timerContagem[MAX_PLAYERS]; //define uma variбvel em primeiro lugar para salvar o id do timer
new varContagem[MAX_PLAYERS]; //variбvel para a contagem regressiva
forward Regressivo(playerid); //define a callback
//Agora a criaзгo do callback
public Regressivo(playerid)
{
new str[50];
varContagem[playerid]--;
format(str, sizeof(str), "Tempo restante %d", varContagem[playerid]);
SendClientMessage(playerid, -1, str);
if(varContagem[playerid] < 1)
{
KillTimer(timerContagem);
varContagem[playerid] = 0;
SendClientMessage(playerid, -1, "Timer terminado");
}
return 1;
}
//E por fim sua aplicaзгo
CMD:iniciar(playerid, params[])
{
if(sscanf(params, "d", temp)) return SendClientMessage(playerid, "Uso: /iniciar [tempo]");
varContagem[playerid] = temp;
timerContagem[playerid] = SetTimerEx("Regressivo", 1000, true, "i", playerid);
return 1;
}

