SA-MP Forums Archive
[Ajuda] Alguйm me ajuda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Alguйm me ajuda (/showthread.php?tid=387694)



Alguйm me ajuda - smithz0r - 25.10.2012

Queria um sistema de count, por exemplo eu sou ADM e digito /count [nъmero].
Daн faz uma contagem regressiva a partir do nъmero que eu digitei


Re: Alguйm me ajuda - ViniBorn - 25.10.2012

pawn Код:
forward Contar(Contagem);
public Contar(Contagem)
{
    new VBString[3];
    format(VBString, 3, "%d",Contagem);
    if(Contagem > 0)
    {
        GameTextForAll(VBString, 700, 5);
        SetTimerEx("Contar",1000, false, "i", Contagem-1);
    }
    else GameTextForAll("Valendo !", 1000, 5);
}



Re: Alguйm me ajuda - smithz0r - 25.10.2012

Nгo entendi '-'
Nгo devia ter um
Код:
if(strcmp(cmd,
ou algo assim? Me ajuda '-' nem sou experiente em pawn


Re: Alguйm me ajuda - ViniBorn - 25.10.2012

Isso й a funзгo. No comando vocк pode colocar assim:

pawn Код:
if(!strcmp(cmd, "/contar"))
{
    new tmp[24]; tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        return SendClientMessage(playerid, -1, "/contar (Numero)");

    Contar(strval(tmp));
    return 1;
}



Re: Alguйm me ajuda - smithz0r - 25.10.2012

vlw, deu certinho