[Ajuda] /darlider Bugado
#2

tente:

pawn Код:
if(strcmp(cmd, "/darlider", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USO: /darlider [id] [1-30]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(level > 30 || level < 0) { SendClientMessage(playerid, COLOR_RED, " Erro: [1~30]"); return 1; }
            new nome[24];
            GetPlayerName(playerid, nome, sizeof nome);
            if(PlayerInfo[playerid][pAdmin] >= 4000)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[para1][pRank] == 0)
                        {
                        if(Infoorg[level][OrgID] == 0)
                        {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pLeader] = level;
                        format(string, sizeof(string), "%s lhe deu o direito administraзгo profissional, digite /rg.", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "%s й o novo lнder administrativo profissional (%d).", giveplayer,level);
                        GetPlayerName(playerid,sendername,256);

         
                        if(level == 0) { PlayerInfo[para1][pChar] = 23; DelMembro(para1);}
                        else if(level == 1) { PlayerInfo[para1][pChar] = 265; gTeam[para1] = 2;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {0000E8}Policia Militar{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Police Force
                        else if(level == 2) { PlayerInfo[para1][pChar] = 286; gTeam[para1] = 2;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {0000E8}FBI{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //FBI/ATF
                        else if(level == 3) { PlayerInfo[para1][pChar] = 287; gTeam[para1] = 2;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider das {3FFF10}Forзas Armadas{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //National Guard
                        else if(level == 4) { PlayerInfo[para1][pChar] = 70; gTeam[para1] = 4;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {0000E8}Nao Use Lider Bugado{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Fire/Ambulance
                        else if(level == 5) { PlayerInfo[para1][pChar] = 104; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {A800F8}Ballas{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Ballas
                        else if(level == 6) { PlayerInfo[para1][pChar] = 270; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {00A613}Groove Street{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Grove
                        else if(level == 7) { PlayerInfo[para1][pChar] = 147; gTeam[para1] = 8;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {F2F503}Sede do Governo{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Presidente
                        else if(level == 8) { PlayerInfo[para1][pChar] = 165; gTeam[para1] = 8;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {2A2A2A}Hitmans{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Hitman
                        else if(level == 9) { PlayerInfo[para1][pChar] = 295; gTeam[para1] = 9;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {9ACD32}San News{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //News Reporters
                        else if(level == 10) { PlayerInfo[para1][pChar] = 47; gTeam[para1] = 47;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {F5C703}Lowriders{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Lowrider
                        else if(level == 11) { PlayerInfo[para1][pChar] = 174; gTeam[para1] = 174;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {2A2A2A}Riffas{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Riffa
                        else if(level == 12) { PlayerInfo[para1][pChar] = 108; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {F2F503}Los Vagos{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Los Vagos
                        else if(level == 13) { PlayerInfo[para1][pChar] = 181; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {2A2A2A}Motoqueiros{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //motoqueiros
                        else if(level == 14) { PlayerInfo[para1][pChar] = 283; gTeam[para1] = 14;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {0000E8}Policia Rodoviбria Federal{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //PR
                        else if(level == 15) { PlayerInfo[para1][pChar] = 115; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {6CECF2}Aztecas{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Aztecas
                        else if(level == 16) { PlayerInfo[para1][pChar] = 118; gTeam[para1] = 16;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {2A2A2A}Triads{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Triads
                        else if(level == 17) { PlayerInfo[para1][pChar] = 294; gTeam[para1] = 16;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {2A2A2A}Yakuza{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Yakuza
                        else if(level == 18) { PlayerInfo[para1][pChar] = 292; gTeam[para1] = 16;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {F5C703}Drifters{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Drifters
                        else if(level == 19) { PlayerInfo[para1][pChar] = 19; gTeam[para1] = 16;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {B00000}Comando Vermelho{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //CV
                        else if(level == 20) { PlayerInfo[para1][pChar] = 293; gTeam[para1] = 16;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider do {0000E8}PCC{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //PCC
                        else if(level == 21) { PlayerInfo[para1][pChar] = 285; gTeam[para1] = 21;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {0000E8}ROTA{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Rota
                        else if(level == 22) { PlayerInfo[para1][pChar] = 290; gTeam[para1] = 22;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {4B4949}Al-Qaeda{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Alqaeda
                        else if(level == 23) { PlayerInfo[para1][pChar] = 164; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider da {0000E8}Policia Civil{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //civil
                        else if(level == 24) { PlayerInfo[para1][pChar] = 279; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {B00000}Bombeiros{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Bombeiros
                        else if(level == 25) { PlayerInfo[para1][pChar] = 213; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {906400}Mendigos{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string);  } //Mendigos
                        else if(level == 26) { PlayerInfo[para1][pChar] = 290; gTeam[para1] = 22;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {4B4949}Talibans{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Talibans
                        else if(level == 27) { PlayerInfo[para1][pChar] = 27; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {67430A}Madeireiros{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Madeireiros
                        else if(level == 28) { PlayerInfo[para1][pChar] = 121; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {67430A}Skin Heads{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Madeireiros
                        else if(level == 29) { PlayerInfo[para1][pChar] = 34; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {67430A}CowBoys{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Madeireiros
                        else if(level == 30) { PlayerInfo[para1][pChar] = 296; gTeam[para1] = 7;format(string, sizeof string, "[Lнderes] SAMP BRASIL RPG Informa: {9ACD32}%s {FFFFFF}й o Novo Lider dos {67430A}Al-Capones{FFFFFF}.", giveplayer);SendClientMessageToAll(COLOR_WHITE,string); } //Madeireiros
                        PlayerInfo[para1][pMember] = level;
                        PlayerInfo[para1][pRank] = 6;
                        PlayerInfo[para1][pTeam] = gTeam[para1];
                        PlayerInfo[para1][pModel] = PlayerInfo[para1][pChar];
                        SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
                        AddMembro(para1);

                        new arquivo[128];
                        format(arquivo, 128, "Checarlider/%d.ini", level);
                        INI_Open(arquivo);
                        INI_WriteInt("Lider", 1);
                        Infoorg[level][OrgID] = 1;
                        INI_Save();
                        INI_Close();
                        }
                        else
                            SendClientMessage(playerid, ERRO, "Essa organizaзгo jб tem lнder!");
                        }
                        else
                            SendClientMessage(playerid, ERRO, "Esse jogador jб estб em outra organizaзгo!");
                    }
                }//not connected
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Sem Autorizaзгo.");
            }
        }
        return 1;
    }
Espero q tenha ajudado!
Reply


Messages In This Thread
/darlider Bugado - by guirigottti - 11.02.2013, 17:51
Re: /darlider Bugado - by VinicioS - 13.02.2013, 12:43
Re: /darlider Bugado - by smiiir - 13.02.2013, 13:20

Forum Jump:


Users browsing this thread: 2 Guest(s)