problema ao aceitar o convite pra ORG
#1

O problema esta nas linha comentadas no cуdigo abaixo, se eu descomentar a linha do (PlayerInfo[playerid][pMembro] = PlayerInfo[InviteOffer[playerid]][pLider]) e comentar a linha do (PlayerInfo[playerid][pMembro] = PlayerInfo[InviteOffer[playerid]][pMembro]), somente o convite que o lнder fizer pro player vai dar certo, ou se fizer ao contrario, somente o convite que o sub-lider fizer vai dar certo quando o player aceitar. Preciso de ajuda para fazer com que os dois consigam convidar e o player consiga aceitar corretamente independente de quem esteja convidando, seja o lider ou o sub-lider. Segue o cуdigo completo abaixo:

PHP код:

if(strcmp(cmd,"/aceitar",true)==0
    { 
        if(
IsPlayerConnected(playerid)) 
        { 
            new 
x_Emprego[32]; 
            
x_Emprego strtok(cmdtextidx); 
            if(!
strlen(x_Emprego)) 
            { 
                
SendClientMessage(playeridCOLOR_WHITE"|_______________ Aceitar _______________A"); 
                
SendClientMessage(playeridCOLOR_WHITE"Use: aceitar [nome]"); 
                
SendClientMessage(playeridCOLOR_GREY"Nomes Validos: drogas, Reparo, Advogado, seguranзa, convite, aovivo, Refill , Assalto, Convite"); 
                
SendClientMessage(playeridCOLOR_GREY"Nomes Validos: Carro, Multa ,divorcio, mendigo, blindagem, Dinamite"); 
                return 
1
            } 
            if(
strcmp(x_Emprego,"convite",true) == 0
            { 
                if(
InviteOffer[playerid] < 999
                { 
                    if(
IsPlayerConnected(InviteOffer[playerid])) 
                    { 
                        if(
PlayerInfo[playerid][pEmprego] > 1
                        { 
                             
SendClientMessage(playeridCOLOR_YELLOW"Voce possui um emprego /sairdoemprego."); 
                                return 
1
                        } 
                        if(
convidado[playerid] == 0
                        { 
                             
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo foi convidado para nenhuma organizaзгo."); 
                             return 
1
                        } 
                        
skincop[playerid] = GetPlayerSkin(playerid); 
                        if(
PlayerInfo[InviteOffer[playerid]][pLider] == 1) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                         else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 2) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 3) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 4) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 5) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 6) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 7) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 8) { SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } 
                         else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 9) { SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 10) { SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 11) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 12) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 13) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 14) { SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 15) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 16) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 17) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 18) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 19) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 20) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 21) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 22) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 23) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 24) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 25) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 26) { SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 27) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 28) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 29) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                        else if(
PlayerInfo[InviteOffer[playerid]][pLider] == 30) { SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } 
                          
//sub-lider 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 1) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//governo 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 2) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//pm 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 3) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//bope 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 4) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//fbi 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 5) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//swat 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 6) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//medico 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 7) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } }//mecanicos 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 8) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } }//reportes 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 9) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } }//taxistas 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 10) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } }//the triads 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 11) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } }//hitmans 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 12) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//mafia cn 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 13) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//yakuza 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 14) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//los vagos 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 15) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//grove 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 16) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//ballas 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 17) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//alqaeda 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 18) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//ei 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 19) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//exercito 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 20) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//sons 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 21) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//devils 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 22) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//interpol 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 23) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//ada 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 24) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//tcp 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 25) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//pcc 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 26) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//cv 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 27) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//pc 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 28) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//taliban 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 29) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//mafia j 
                        
else if(PlayerInfo[InviteOffer[playerid]][pMembro] == 30) { if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//mafia m 
                        
convidado[playerid] = 0
                          
PlayerInfo[playerid][pMembro] = PlayerInfo[InviteOffer[playerid]][pLider]; //Provavel erro 
                        
PlayerInfo[playerid][pCargo] = 1
                           
format(gstring128"* %s aceitou seu convite para entrar na sua organizaзгo."PlayerName(playerid)); 
                           
SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUEgstring); 
                        
format(gstringsizeof(gstring), "* Vocк aceitou o convite de %s para entrar para organizaзгo: %s, parabйns."PlayerName(InviteOffer[playerid]), NomeORG(InviteOffer[playerid])); 
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEgstring); 
                        
ConviteInfoOrg(PlayerName(playerid), InviteJob[playerid], 1); 
                        if(
PlayerInfo[playerid][pMembro] == 1) { PlayerInfo[playerid][pDepartamentoLS] = 1; } 
                        if(
PlayerInfo[playerid][pMembro] == 5) { PlayerInfo[playerid][pDepartamentoLS] = 1; } 
                        if(
PlayerInfo[playerid][pMembro] == 6) { PlayerInfo[playerid][pDepartamentoLS] = 1; } 
                        if(
PlayerInfo[playerid][pMembro] == 7) { PlayerInfo[playerid][pDepartamentoLS] = 1; } 
                        if(
PlayerInfo[playerid][pMembro] == 27) { PlayerInfo[playerid][pDepartamentoLS] = 1; } 
                        
SetPlayerSpawn(playerid); 
                    } 
                    else 
                    { 
                        
SendClientMessage(playeridCOLOR_GREY"O jogador que lhe convidou nгo estб conectado."); 
                        return 
1
                    } 
                } 
                else 
                { 
                    
SendClientMessage(playeridCOLOR_GREY"Vocк nгo foi convidado para nenhuma organizaзгo."); 
                    return 
1
                } 
            } 
Reply
#2

Mano, Sem post duplo,alem de a minha reposta no outro post:
Quote:
Originally Posted by RazorGuigo
Посмотреть сообщение
de uma olhada em Switch() & Case:, ele й praticamente 100X mais rapido que IF, e deixa o codigo bem mais limpo!
Tambem use: "else return SendClientMessage(...);" porque ele vai ler sу uma linha, do else, e o SendClientMessage retorna 1 se o player esta conectado
Quote:
Originally Posted by ViniFox
Посмотреть сообщение
cara, eu nгo quero trocar o cуdigo. Eu estou querendo uma opniao de outro scripter, pois eu sei a linha onde estб o problema, mas, nгo sei como resolver. Por isso estou pedindo ajuda...
o meu codigo й o mesmo que o teu, sу que ele й +_600 vezes mais rapido, e muito mais limpo e melhor para editar!
e eu testei com alguma coisa q deve ser parecida com o teu /recrutar, e funfou!
PHP код:
if(strcmp(cmd,"/aceitar",true)==0)   
    {   
        new 
x_Emprego[32];   
        
x_Emprego strtok(cmdtextidx);   
        if(!
strlen(x_Emprego))   
        {   
            
SendClientMessage(playeridCOLOR_WHITE"|_______________ Aceitar _______________A");   
            
SendClientMessage(playeridCOLOR_WHITE"Use: aceitar [nome]");   
            
SendClientMessage(playeridCOLOR_GREY"Nomes Validos: drogas, Reparo, Advogado, seguranзa, convite, aovivo, Refill , Assalto, Convite");   
            return 
SendClientMessage(playeridCOLOR_GREY"Nomes Validos: Carro, Multa ,divorcio, mendigo, blindagem, Dinamite");   
        }   
        if(
strcmp(x_Emprego,"convite",true) == 0)   
        {   
            if(
InviteOffer[playerid] < 999)   
            {   
                if(
IsPlayerConnected(InviteOffer[playerid]))   
                {   
                    if(
PlayerInfo[playerid][pEmprego] > 1) return SendClientMessage(playeridCOLOR_YELLOW"Voce possui um emprego /sairdoemprego.");   
                    if(
convidado[playerid] == 0)  return SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo foi convidado para nenhuma organizaзгo.");   
                    
skincop[playerid] = GetPlayerSkin(playerid); 
                    switch(
PlayerInfo[InviteOffer[playerid]][pLider]) 
                    { 
                        case 
1,2,3,4,7,12,13,17,25:{SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2;}   
                        case 
6,11,15..24,27..30:{SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5;}   
                        case 
8,9,10,14,26:{SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10;}   
                    } 
                    switch(
PlayerInfo[InviteOffer[playerid]][pMembro]) 
                    {  
                        case 
1..6,19,22,27:{ if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5) { SetSpawnInfo(playerid2PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2; } }//governo   
                        
case 7..11:{ if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid10PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10; } }//mecanicos   
                        
case 12..18,20,21,23,24,25,26,28,29,30:{if(PlayerInfo[InviteOffer[playerid]][pCargo] == 5){ SetSpawnInfo(playerid5PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5; } }//mafia cn   
                    
}     
                    
convidado[playerid] = 0;   
                    
PlayerInfo[playerid][pMembro] = PlayerInfo[InviteOffer[playerid]][pLider]; //Provavel erro   
                    
PlayerInfo[playerid][pCargo] = 1;   
                    
format(gstring128"* %s aceitou seu convite para entrar na sua organizaзгo."PlayerName(playerid));   
                    
SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUEgstring);   
                    
format(gstringsizeof(gstring), "* Vocк aceitou o convite de %s para entrar para organizaзгo: %s, parabйns."PlayerName(InviteOffer[playerid]), NomeORG(InviteOffer[playerid]));   
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEgstring);   
                    
ConviteInfoOrg(PlayerName(playerid), InviteJob[playerid], 1);   
                    if(
PlayerInfo[playerid][pMembro] == 1) { PlayerInfo[playerid][pDepartamentoLS] = 1; }   
                    if(
PlayerInfo[playerid][pMembro] == 5) { PlayerInfo[playerid][pDepartamentoLS] = 1; }   
                    if(
PlayerInfo[playerid][pMembro] == 6) { PlayerInfo[playerid][pDepartamentoLS] = 1; }   
                    if(
PlayerInfo[playerid][pMembro] == 7) { PlayerInfo[playerid][pDepartamentoLS] = 1; }   
                    if(
PlayerInfo[playerid][pMembro] == 27) { PlayerInfo[playerid][pDepartamentoLS] = 1; }   
                     
SetPlayerSpawn(playerid);   
                }   
                else  return 
SendClientMessage(playeridCOLOR_GREY"O jogador que lhe convidou nгo estб conectado.");   
            }   
            else return 
SendClientMessage(playeridCOLOR_GREY"Vocк nгo foi convidado para nenhuma organizaзгo.");   
       }  

qualquer coisa desmembra os "case:"
Reply
#3

blz, vou testar, como vc me falou... vc pode passar seu skype? pra caso de algum erro?
Reply
#4

Esse cуdigo que me mandou nгo ta funfando...
Reply
#5

Continua dando o mesmo erro cara, mesmo com esse cуdigo seu..
Reply
#6

adiciona la no skype que te ajudo:
id: *********
Nick: ********
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)