[PEDIDO]Estes 2 comandos para cargo 444 e 555
#1

Por favor eu nao consegui passar estes comando para os cargos 444 e 555 por favor me ajudem

PHP код:
    if(strcmp(cmd"/convidar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /convidar [ id ]");
                return 
1;
            }
            new 
para1;
            new 
norg[40];
            
para1 ReturnUser(tmp);
            if (
PlayerInfo[playerid][pLider] >= 1)
            {
                if(
IsPlayerConnected(para1))
                {
                    if(
PlayerInfo[para1][pLevel] < 0) { SendClientMessage(playeridCOLOR_GREY"So pode convidar quem й nivel 0 ou acima de 0!!!"); return 1;
                    }
                    if(
para1 != INVALID_PLAYER_ID)
                          {
                             if (
PlayerInfo[para1][pMembro] == 0)
                            {
                            if(
PlayerInfo[playerid][pLider] == 1) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2norg "Polнcia Militar"ChosenSkin[para1] = 282SetPlayerSkin(para1282); }
                            else if(
PlayerInfo[playerid][pLider] == 2) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2norg "BOPE"ChosenSkin[para1] = 285SetPlayerSkin(para1285); }
                            else if(
PlayerInfo[playerid][pLider] == 3) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2norg "Exйrcito"ChosenSkin[para1] = 287SetPlayerSkin(para1287); }
                            else if(
PlayerInfo[playerid][pLider] == 4) { PlayerInfo[para1][pTeam] = 1gTeam[para1] = 1norg "Mйdicos"ChosenSkin[para1] = 279SetPlayerSkin(para1279); }
                            else if(
PlayerInfo[playerid][pLider] == 5) { PlayerInfo[para1][pTeam] = 5gTeam[para1] = 5norg "Aztecas"ChosenSkin[para1] = 114SetPlayerSkin(para1114); }
                            else if(
PlayerInfo[playerid][pLider] == 6) { PlayerInfo[para1][pTeam] = 5gTeam[para1] = 5norg "Guerreiros Israelitas"ChosenSkin[para1] = 121SetPlayerSkin(para1121); }
                            else if(
PlayerInfo[playerid][pLider] == 7) { PlayerInfo[para1][pTeam] = 7gTeam[para1] = 7norg "Prefeitura"ChosenSkin[para1] = 163SetPlayerSkin(para1163); }
                            else if(
PlayerInfo[playerid][pLider] == 8) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12norg "Hitmans"ChosenSkin[para1] = 127SetPlayerSkin(para1127); }
                            else if(
PlayerInfo[playerid][pLider] == 9) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12norg "Repуrteres"ChosenSkin[para1] = 148SetPlayerSkin(para1148); }
                            else if(
PlayerInfo[playerid][pLider] == 10) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12norg "Taxistas"ChosenSkin[para1] = 253SetPlayerSkin(para1253); }
                            else if(
PlayerInfo[playerid][pLider] == 11) { PlayerInfo[para1][pTeam] = 25gTeam[para1] = 2norg "Polнcia Federal"ChosenSkin[para1] = 286SetPlayerSkin(para1286); }
                            else { return 
1; }
                            
GetPlayerName(para1giveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            
PlayerInfo[para1][pMembro] = PlayerInfo[playerid][pLider];
                            
PlayerInfo[para1][pCargo] = 1;
                            
printf("ADMIN CMD: %s convidou %s."sendernamegiveplayer);
                            
format(stringsizeof(string), "Voce foi convidado para ser da %s pelo Lнder %s"norgsendername);
                            
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                            
format(stringsizeof(string), "Voce convidou %s para a organizaзгo."giveplayer);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                            
SetPlayerInterior(para1,0);
                            
PlayerInfo[para1][pCarLic] = 1;
                            
PlayerInfo[para1][pFlyLic] = 1;
                            
PlayerInfo[para1][pBoatLic] = 1;
                            
PlayerInfo[para1][pFishLic] = 1;
                            
PlayerInfo[para1][pGunLic] = 1;
                            new 
rand random(sizeof(gInviteSpawns));
                            
SetPlayerPos(para1gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                            
SetPlayerFacingAngle(para1gInviteSpawns[rand][3]);
                            
CameraPos(para1,gInviteSpawns[rand][0] + 3gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            
Controle(para10);
                            
SelectChar[para1] = 255;
                            
SelectCharID[para1] = PlayerInfo[para1][pMembro];
                            
SelectCharPlace[para1] = 1;
                            
PlayerInfo[para1][pSkin] = ChosenSkin[para1];
                            
SetPlayerSkin(para1ChosenSkin[para1]);
                            
ShowPlayerDialog(para11234DIALOG_STYLE_MSGBOX"{FFFFFF}Escolha sua skin""{FFFFFF}Utilize o botгo prуximo para mudar de skin\nCaso tenha escolhido, aperte Pronto""Proximo""Pronto");
                            new 
org PlayerInfo[playerid][pLider];
                            
ConviteInfoOrg(PlayerName(para1), org1);
                            }
                                else
                            {
                            
SendClientMessage(playeridCOLOR_GREY"Este player ou e Procura / Tem Emprego ou / Familia");
                            return 
1;
                        }
                    }
                }
//not connected
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Voce nao esta autorizado para usar este cmd ( Apenas Lideres )!");
            }
        }
        return 
1;
    }
    if(
strcmp(cmd"/Demitir"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"/Demitir [ID/NICK] [Motivo]");
                return 
1;
            }
            new 
para1;
            
para1 ReturnUser(tmp);
            if (
PlayerInfo[playerid][pLider] > || PlayerInfo[playerid][pCargo] == 5)
            {
                new 
lolz GetPlayerOrg(playerid);
                if(
PlayerInfo[para1][pMembro] != lolz)
                {
                    
SendClientMessage(playeridCOLOR_GREY"Vocк nгo pode demitir quem nгo й da sua org.");
                    return 
1;
                }
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        if (
PlayerInfo[para1][pMembro] > 0)
                        {
                            
GetPlayerName(para1giveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            new 
length strlen(cmdtext);
                            while ((
idx length) && (cmdtext[idx] <= ' '))
                            {
                                
idx++;
                            }
                            new 
offset idx;
                            new 
result[64];
                            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                            {
                                
result[idx offset] = cmdtext[idx];
                                
idx++;
                            }
                            
result[idx offset] = EOS;
                            if(!
strlen(result))
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"USE: /Demitir [ID/NICK] [Motivo]");
                                return 
1;
                            }
                            
DemitirInfoOrg(PlayerName(para1));
                            
format(stringsizeof(string), "* Vocк foi demitido pelo lнder %s Motivo: %s."sendername, (result));
                            
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                            
SendClientMessage(para1COLOR_LIGHTBLUE"* Agora vocк й um civil novamente.");
                            
gTeam[para1] = 3;
                            
PlayerInfo[para1][pTeam] = 3;
                            
PlayerInfo[para1][pMembro] = 0;
                            
PlayerInfo[para1][pCargo] = 0;
                            if(
PlayerInfo[para1][pSex] == 1) { PlayerInfo[para1][pModel] = 293; } else { PlayerInfo[para1][pModel] = 12; }
                            
SetSpawnInfo(para1gTeam[para1], PlayerInfo[para1][pModel],0.0,0.0,0.0,0,0,0,0,0,0,0);
                            
MedicBill[para1] = 0;
                            
SpawnPlayer(para1);
                            
format(stringsizeof(string), "Vocк demitiu %s, Motivo: %s."giveplayerresult);
                            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                            return 
1;
                        }
                    }
                }
            }
//not connected
        
}
        else
        {
            
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo й um lнder!");
        }
        return 
1;
    } 
Reply
#2

Desculpe-me se estiver errado, sou iniciante em pawn.
Tente:

pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [ id ]");
                return 1;
            }
            new para1;
            new norg[40];
            para1 = ReturnUser(tmp);
             if (PlayerInfo[playerid][pLider] > 0 || PlayerInfo[playerid][pCargo] == 4 )
            {
                if(IsPlayerConnected(para1))
                {
                    if(PlayerInfo[para1][pLevel] < 0) { SendClientMessage(playerid, COLOR_GREY, "So pode convidar quem й nivel 0 ou acima de 0!!!"); return 1;
                    }
                    if(para1 != INVALID_PLAYER_ID)
                          {
                             if (PlayerInfo[para1][pMembro] == 0)
                            {
                            if(PlayerInfo[playerid][pLider] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; norg = "Polнcia Militar"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
                            else if(PlayerInfo[playerid][pLider] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; norg = "BOPE"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
                            else if(PlayerInfo[playerid][pLider] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; norg = "Exйrcito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
                            else if(PlayerInfo[playerid][pLider] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; norg = "Mйdicos"; ChosenSkin[para1] = 279; SetPlayerSkin(para1, 279); }
                            else if(PlayerInfo[playerid][pLider] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; norg = "Aztecas"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }
                            else if(PlayerInfo[playerid][pLider] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; norg = "Guerreiros Israelitas"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
                            else if(PlayerInfo[playerid][pLider] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; norg = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); }
                            else if(PlayerInfo[playerid][pLider] == 8) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; norg = "Hitmans"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
                            else if(PlayerInfo[playerid][pLider] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; norg = "Repуrteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
                            else if(PlayerInfo[playerid][pLider] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; norg = "Taxistas"; ChosenSkin[para1] = 253; SetPlayerSkin(para1, 253); }
                            else if(PlayerInfo[playerid][pLider] == 11) { PlayerInfo[para1][pTeam] = 25; gTeam[para1] = 2; norg = "Polнcia Federal"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
                            else { return 1; }
                            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            PlayerInfo[para1][pMembro] = PlayerInfo[playerid][pLider];
                            PlayerInfo[para1][pCargo] = 1;
                            printf("ADMIN CMD: %s convidou %s.", sendername, giveplayer);
                            format(string, sizeof(string), "Voce foi convidado para ser da %s pelo Lнder %s", norg, sendername);
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "Voce convidou %s para a organizaзгo.", giveplayer);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                            SetPlayerInterior(para1,0);
                            PlayerInfo[para1][pCarLic] = 1;
                            PlayerInfo[para1][pFlyLic] = 1;
                            PlayerInfo[para1][pBoatLic] = 1;
                            PlayerInfo[para1][pFishLic] = 1;
                            PlayerInfo[para1][pGunLic] = 1;
                            new rand = random(sizeof(gInviteSpawns));
                            SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                            SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
                            CameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            Controle(para1, 0);
                            SelectChar[para1] = 255;
                            SelectCharID[para1] = PlayerInfo[para1][pMembro];
                            SelectCharPlace[para1] = 1;
                            PlayerInfo[para1][pSkin] = ChosenSkin[para1];
                            SetPlayerSkin(para1, ChosenSkin[para1]);
                            ShowPlayerDialog(para1, 1234, DIALOG_STYLE_MSGBOX, "{FFFFFF}Escolha sua skin", "{FFFFFF}Utilize o botгo prуximo para mudar de skin\nCaso tenha escolhido, aperte Pronto", "Proximo", "Pronto");
                            new org = PlayerInfo[playerid][pLider];
                            ConviteInfoOrg(PlayerName(para1), org, 1);
                            }
                                else
                            {
                            SendClientMessage(playerid, COLOR_GREY, "Este player ou e Procura / Tem Emprego ou / Familia");
                            return 1;
                        }
                    }
                }//not connected
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Voce nao esta autorizado para usar este cmd ( Apenas Lideres )!");
            }
        }
        return 1;
    }

    if(strcmp(cmd, "/Demitir", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "/Demitir [ID/NICK] [Motivo]");
                return 1;
            }
            new para1;
            para1 = ReturnUser(tmp);
            if (PlayerInfo[playerid][pLider] > 0 || PlayerInfo[playerid][pCargo] == 4)
            {
                new lolz = GetPlayerOrg(playerid);
                if(PlayerInfo[para1][pMembro] != lolz)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode demitir quem nгo й da sua org.");
                    return 1;
                }
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        if (PlayerInfo[para1][pMembro] > 0)
                        {
                            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            new length = strlen(cmdtext);
                            while ((idx < length) && (cmdtext[idx] <= ' '))
                            {
                                idx++;
                            }
                            new offset = idx;
                            new result[64];
                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                            {
                                result[idx - offset] = cmdtext[idx];
                                idx++;
                            }
                            result[idx - offset] = EOS;
                            if(!strlen(result))
                            {
                                SendClientMessage(playerid, COLOR_GRAD2, "USE: /Demitir [ID/NICK] [Motivo]");
                                return 1;
                            }
                            DemitirInfoOrg(PlayerName(para1));
                            format(string, sizeof(string), "* Vocк foi demitido pelo lнder %s Motivo: %s.", sendername, (result));
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            SendClientMessage(para1, COLOR_LIGHTBLUE, "* Agora vocк й um civil novamente.");
                            gTeam[para1] = 3;
                            PlayerInfo[para1][pTeam] = 3;
                            PlayerInfo[para1][pMembro] = 0;
                            PlayerInfo[para1][pCargo] = 0;
                            if(PlayerInfo[para1][pSex] == 1) { PlayerInfo[para1][pModel] = 293; } else { PlayerInfo[para1][pModel] = 12; }
                            SetSpawnInfo(para1, gTeam[para1], PlayerInfo[para1][pModel],0.0,0.0,0.0,0,0,0,0,0,0,0);
                            MedicBill[para1] = 0;
                            SpawnPlayer(para1);
                            format(string, sizeof(string), "Vocк demitiu %s, Motivo: %s.", giveplayer, result);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            return 1;
                        }
                    }
                }
            }//not connected
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um lнder!");
        }
        return 1;
    }
Reply
#3

kk, d boa mas vc seto para 4 eu pedi 444 e 555 xD
Reply
#4

entao seta vc qr tudo nao mao se ajude tbm
Reply
#5

pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [ id ]");
                return 1;
            }
            new para1;
            new norg[40];
            para1 = ReturnUser(tmp);
            if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] >= 444)
            {
                if(IsPlayerConnected(para1))
                {
                    if(PlayerInfo[para1][pLevel] < 0) { SendClientMessage(playerid, COLOR_GREY, "So pode convidar quem й nivel 0 ou acima de 0!!!"); return 1;
                    }
                    if(para1 != INVALID_PLAYER_ID)
                          {
                             if (PlayerInfo[para1][pMembro] > 0)
                            {
                            if(PlayerInfo[playerid][pLider] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; norg = "Polнcia Militar"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
                            else if(PlayerInfo[playerid][pLider] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; norg = "BOPE"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
                            else if(PlayerInfo[playerid][pLider] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; norg = "Exйrcito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
                            else if(PlayerInfo[playerid][pLider] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; norg = "Mйdicos"; ChosenSkin[para1] = 279; SetPlayerSkin(para1, 279); }
                            else if(PlayerInfo[playerid][pLider] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; norg = "Aztecas"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }
                            else if(PlayerInfo[playerid][pLider] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; norg = "Guerreiros Israelitas"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
                            else if(PlayerInfo[playerid][pLider] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; norg = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); }
                            else if(PlayerInfo[playerid][pLider] == 8) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; norg = "Hitmans"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
                            else if(PlayerInfo[playerid][pLider] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; norg = "Repуrteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
                            else if(PlayerInfo[playerid][pLider] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; norg = "Taxistas"; ChosenSkin[para1] = 253; SetPlayerSkin(para1, 253); }
                            else if(PlayerInfo[playerid][pLider] == 11) { PlayerInfo[para1][pTeam] = 25; gTeam[para1] = 2; norg = "Polнcia Federal"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
                            else { return 1; }
                            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            PlayerInfo[para1][pMembro] = PlayerInfo[playerid][pLider];
                            PlayerInfo[para1][pCargo] = 1;
                            printf("ADMIN CMD: %s convidou %s.", sendername, giveplayer);
                            format(string, sizeof(string), "Voce foi convidado para ser da %s pelo Lнder %s", norg, sendername);
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "Voce convidou %s para a organizaзгo.", giveplayer);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                            SetPlayerInterior(para1,0);
                            PlayerInfo[para1][pCarLic] = 1;
                            PlayerInfo[para1][pFlyLic] = 1;
                            PlayerInfo[para1][pBoatLic] = 1;
                            PlayerInfo[para1][pFishLic] = 1;
                            PlayerInfo[para1][pGunLic] = 1;
                            new rand = random(sizeof(gInviteSpawns));
                            SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                            SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
                            CameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                            Controle(para1, 0);
                            SelectChar[para1] = 255;
                            SelectCharID[para1] = PlayerInfo[para1][pMembro];
                            SelectCharPlace[para1] = 1;
                            PlayerInfo[para1][pSkin] = ChosenSkin[para1];
                            SetPlayerSkin(para1, ChosenSkin[para1]);
                            ShowPlayerDialog(para1, 1234, DIALOG_STYLE_MSGBOX, "{FFFFFF}Escolha sua skin", "{FFFFFF}Utilize o botгo prуximo para mudar de skin\nCaso tenha escolhido, aperte Pronto", "Proximo", "Pronto");
                            new org = PlayerInfo[playerid][pLider];
                            ConviteInfoOrg(PlayerName(para1), org, 1);
                            }
                                else
                            {
                            SendClientMessage(playerid, COLOR_GREY, "Este player ou e Procura / Tem Emprego ou / Familia");
                            return 1;
                        }
                    }
                }//not connected
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Voce nao esta autorizado para usar este cmd ( Apenas Lideres )!");
            }
        }
        return 1;
    }

    if(strcmp(cmd, "/Demitir", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "/Demitir [ID/NICK] [Motivo]");
                return 1;
            }
            new para1;
            para1 = ReturnUser(tmp);
            if (PlayerInfo[playerid][pLider] > 0 || PlayerInfo[playerid][pCargo] >= 444)
            {
                new lolz = GetPlayerOrg(playerid);
                if(PlayerInfo[para1][pMembro] != lolz)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode demitir quem nгo й da sua org.");
                    return 1;
                }
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        if (PlayerInfo[para1][pMembro] > 0)
                        {
                            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            new length = strlen(cmdtext);
                            while ((idx < length) && (cmdtext[idx] <= ' '))
                            {
                                idx++;
                            }
                            new offset = idx;
                            new result[64];
                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                            {
                                result[idx - offset] = cmdtext[idx];
                                idx++;
                            }
                            result[idx - offset] = EOS;
                            if(!strlen(result))
                            {
                                SendClientMessage(playerid, COLOR_GRAD2, "USE: /Demitir [ID/NICK] [Motivo]");
                                return 1;
                            }
                            DemitirInfoOrg(PlayerName(para1));
                            format(string, sizeof(string), "* Vocк foi demitido pelo lнder %s Motivo: %s.", sendername, (result));
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            SendClientMessage(para1, COLOR_LIGHTBLUE, "* Agora vocк й um civil novamente.");
                            gTeam[para1] = 3;
                            PlayerInfo[para1][pTeam] = 3;
                            PlayerInfo[para1][pMembro] = 0;
                            PlayerInfo[para1][pCargo] = 0;
                            if(PlayerInfo[para1][pSex] == 1) { PlayerInfo[para1][pModel] = 293; } else { PlayerInfo[para1][pModel] = 12; }
                            SetSpawnInfo(para1, gTeam[para1], PlayerInfo[para1][pModel],0.0,0.0,0.0,0,0,0,0,0,0,0);
                            MedicBill[para1] = 0;
                            SpawnPlayer(para1);
                            format(string, sizeof(string), "Vocк demitiu %s, Motivo: %s.", giveplayer, result);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            return 1;
                        }
                    }
                }
            }//not connected
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um lнder!");
        }
        return 1;
    }
Dependendo de como eu postei o cуdigo, nгo precisa adicionar mais cargo 555 ao comando, pois o 444 estб definido por ser maior ou igual.
Reply
#6

kk, vlw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)