04.05.2012, 20:27
Quote:
Esse que vocк me passou da para fazer /contar [segundos] ?
Que й os segundos que eu quero que conte |
pawn Код:
// no topo do gm.
new contagem, timercont;
// nos comandos
if (strcmp(cmd, "/contagem",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessageToAll(-1, "Informe um nє para iniciar a contagem");
contagem = strval(tmp);
timercont = SetTimer("contt",1000, true);
SendClientMessageToAll(-1, "Alguem iniciou a Contagem");
return 1;
}
// no final do gm
forward contt()
public contt()
{
new str[50];
format(str,sizeof str, "%i",contagem);
if( contagem < 0){ format(str,sizeof str, "GO GO GO GO!"); KillTimer(timercont);}
GameTextForAll(str,1000,3);
contagem--;
return 1;
}
@edit, nгo vi seu post garfild..
@topic o do gato tbm ta certinho hehe