SA-MP Forums Archive
[Ajuda] Qual o problema? /limparlider - 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] Qual o problema? /limparlider (/showthread.php?tid=468659)



Qual o problema? /limparlider - bombomloko - 09.10.2013

Quando uso esse comando, se o lнder estб on, ele й demitido e tudo ok, mas se ele ta off, apenas aparece no /orgs que nгo tem lнder na tal org, mas quando o cara loga de volta, ele volta como lнder e a org passa a ter dois lнderes...

pawn Код:
if (strcmp(cmd, "/limparlider", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < MASTER)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Somente admins master ou dono podem usar este comando!");
            return true;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparlider [organizaзгo]");
            return true;
        }
        new Vaga2 = strval(tmp);
        if(Vaga2 < 1 || Vaga2 > 23) { SendClientMessage(playerid, COLOR_GREY, "Vaga mнnima 1, mбximo 23!"); return true; }
        new id=GetPlayerID(InfoOrg[Vaga2][Lider]);
        format(string, sizeof(string), "ADMIN: %s limpou a vaga %d do lнder %s",PlayerName(playerid), Vaga2, InfoOrg[Vaga2][Lider]);
        LideresLog(string);
        if(IsPlayerOnline(InfoOrg[Vaga2][Lider])) DemitirLider(id);
        strmid(InfoOrg[Vaga2][Lider], "Ninguem", 0, strlen("Ninguem"), 255);
        format(gstring, 128, "ORG Arquivos/Org%d.cfg", Vaga2);
        DOF2_SetString(gstring,"Lider","Ninguem");
        DOF2_SaveFile();
        format(string, sizeof(string), "Vocк limpou o lнder da organizaзгo Nє %d",Vaga2);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        return true;
    }



Re: Qual o problema? /limparlider - bombomloko - 09.10.2013

up :/


Re: Qual o problema? /limparlider - .ThePro - 09.10.2013

Cara, se vocк quer tirar o level de alguйm que estб off tem que ser pelo nick e nгo pelo ID.


Re: Qual o problema? /limparlider - bombomloko - 09.10.2013

Nгo entendi... eu quero que o fulano que estб off seja demitido de lнder quando eu usar esse comando...