Quote:
Originally Posted by steeldark
jeito mais simples de se fazer й esse:
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; }
lembrando, contagem em segundos.
|
O jeito mais simples foi oque eu postei acima, nгo precisa de strtok.