[Ajuda] /tirarlider bugado
#1

Tipo eu ponho /tirarlider nao vai , ja fiz 3 comandos e nao foi - - '- - '

pawn Код:
if(strcmp(cmd,"/tirarlider2",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 4)
        {
            new orgn[256];
            new OrgID = GetOrgID(playerid);
            if(admtrabalhando[playerid] < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            orgn = strtok(cmdtext,idx);
            if(!strlen(orgn))
            {
                SendClientMessage(playerid,COLOR_GRAD1,"/tirarlider [Nъmero da org]");
                return 1;
            }
            format(orgn, sizeof(orgn), "orgs/%i.ini",OrgID);
            if(dini_Exists(orgn))
            {
            dini_Set(orgn,"Lider","Livre");
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new year, month,day;
            getdate(year, month, day);
            new hour, minute;
            gettime(hour,minute);
            format(string, sizeof(string), "Organizaзгo nъmero %s Foi removido o lider pelo admin %s DATA ( %d/%d/%d - %d:%d )", orgn, sendername, year, month, day,hour, minute);
            ABroadCast(COLOR_YELLOW,string,1);
        }
        return 1;
    }
    if(strcmp(cmd,"/tirarlider",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 4)
        {
            new orgn[256];
            new OrgID = GetOrgID(playerid);
            if(admtrabalhando[playerid] < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            tmp = strtok(cmdtext,idx);
            OrgID = strval(tmp);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid,COLOR_GRAD1,"/tirarlider [Nъmero da org]");
                return 1;
            }
            format(orgn, sizeof(orgn), "orgs/%d.ini",OrgID);
            if(dini_Exists(orgn))
            {
            dini_Set(orgn,"Lider","Livre");
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new year, month,day;
            getdate(year, month, day);
            new hour, minute;
            gettime(hour,minute);
            format(string, sizeof(string), "Organizaзгo nъmero %s Foi removido o lider pelo admin %s DATA ( %d/%d/%d - %d:%d )", OrgID, sendername, year, month, day,hour, minute);
            ABroadCast(COLOR_YELLOW,string,1);
        }
        return 1;
    }
   if(strcmp(cmd, "/tirarlider3", true) == 0)//comando para limpar os admins
    {
        if(IsPlayerConnected(playerid))
        {
            new OrgID = GetOrgID(playerid);
   if(PlayerInfo[playerid][pAdmin] >= 4)
            {
             RemovePlayerLeader(OrgID);
             SendClientMessage(playerid, COLOR_LIGHTBLUE,"Voce Limpou O Lider da org");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo estб autorizado a usar este comando!");
            }
        }
        return 1;
    }
Reply
#2

pawn Код:
RemovePlayerLeader(OrgID);
tenta issso
pawn Код:
ResetPlayerLeader(OrgID);
se nгo der certo nгo sei oque й nгo so muito bom com RPG
Reply
#3

Magno tipo assim eu colokei estilo um dialog entendeu , q aparece oq acontece no .txt , tipo o /tirarlider2 e o normal q tam bugado .
Reply
#4

pelo que eu entendi esse CMD que vc estб se referindo certo? Comando alterado
pawn Код:
if(strcmp(cmd,"/tirarlider",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 4)
        {
            new orgn[256];
            new OrgID = GetOrgID(playerid);
            if(admtrabalhando[playerid] < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            tmp = strtok(cmdtext,idx);
            OrgID = strval(tmp);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid,COLOR_GRAD1,"/tirarlider [Nъmero da org]");
                return 1;
            }
            format(orgn, sizeof(orgn), "orgs/%d.ini",OrgID);
            if(dini_Exists(orgn))
            {
            dini_Set(orgn,"Lider","Livre");
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new year, month,day;
            getdate(year, month, day);

            new hour, minute;
            gettime(hour,minute);
            format(string, sizeof(string), "Organizaзгo nъmero %s Foi removido o lider pelo admin %s DATA ( %d/%d/%d - %d:%d )", OrgID, sendername, year, month, day,hour, minute);
            ABroadCast(COLOR_YELLOW,string,1);
            RemovePlayerLeader(playerid);//estava faltando essa linha nele
        }
        return 1;
    }
Reply
#5

afe - - ' nem percebi
Reply
#6

Quote:
Originally Posted by rene20
Посмотреть сообщение
afe - - ' nem percebi
hehehe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)