[Ajuda] Comando /contar
#6

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.
Reply


Messages In This Thread
[Ajuda] Comando /contar - by Micael.Nees - 04.05.2012, 19:03
Re: [Ajuda] Comando /contar - by ViniBorn - 04.05.2012, 19:08
Re: [Ajuda] Comando /contar - by Micael.Nees - 04.05.2012, 20:09
Re: [Ajuda] Comando /contar - by zSuYaNw - 04.05.2012, 20:21
Re: [Ajuda] Comando /contar - by steeldark - 04.05.2012, 20:27
Re: [Ajuda] Comando /contar - by zSuYaNw - 04.05.2012, 20:28
Re: [Ajuda] Comando /contar - by steeldark - 04.05.2012, 20:29
Re: [Ajuda] Comando /contar - by Micael.Nees - 04.05.2012, 20:33

Forum Jump:


Users browsing this thread: 1 Guest(s)