[AJUDA] O comando /convidar faz o server cair
#9

Procure deixar sempre os else embaixo dos seus correspondentes if


Isto deve resolver o seu problema:


pawn Код:
if(strcmp(x_job,"convite",true) == 0)
            {
                if(Invite[playerid] == 1)
                {
                    if(IsPlayerConnected(InviteOffer[playerid]))
                    {
                        new str[256];
                        new ftext[20];
                        GetPlayerName(InviteOffer[playerid], giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(PlayerInfo[InviteOffer[playerid]][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PM"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PF"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "Forзas Armadas"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "Emergкncias."; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Ballas Gang"; ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Grove Street"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "Polнtico"; ChosenSkin[playerid] = 295; SetPlayerSkin(playerid, 295); }
                            {
                            format(str, 256, "* %s aceitou seu convite proposto a organizaзгo '%s'.", sendername, ftext);
                            SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str);
                            format(str, 256, "* Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
                            SelectCharID[playerid] = PlayerInfo[playerid][pMember];
                            SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]);
                            PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
                            PlayerInfo[playerid][pRank] = 1;
                            return 1;
                        }
                        if(PlayerInfo[InviteOffer[playerid]][pLeader] == 8) { PlayerInfo[playerid][pTeam] = 8; gTeam[playerid] = 8; ftext = "Assassino"; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 9; gTeam[playerid] = 9; ftext = "Repуrter"; ChosenSkin[playerid] = 227; SetPlayerSkin(playerid, 227); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; ftext = "Instrutor"; ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Vagos"; ChosenSkin[playerid] = 109; SetPlayerSkin(playerid, 109); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 13) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Motoqueiros"; ChosenSkin[playerid] = 254; SetPlayerSkin(playerid, 254); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 14) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 5; ftext = "Policia Rodoviбria"; ChosenSkin[playerid] = 288; SetPlayerSkin(playerid, 288); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 15) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Aztecas"; ChosenSkin[playerid] = 116; SetPlayerSkin(playerid, 116); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 16) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "Triads"; ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 17) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "yakuza"; ChosenSkin[playerid] = 123; SetPlayerSkin(playerid, 123); }
                        else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 18) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "terroristas"; ChosenSkin[playerid] = 291; SetPlayerSkin(playerid, 291); }
                        else { return 1; }
                        PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader];
                        PlayerInfo[playerid][pRank] = 1;
                        SelectCharID[playerid] = PlayerInfo[playerid][pMember];
                        format(str, 256, "* %s aceitou seu convite proposto a organizaзгo '%s'.", sendername, ftext);
                        SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str);
                        SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]);
                        format(str, 256, "* Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "    O jogador que lhe convidou nгo estб conectado.");
                        return 1;
                    }
                }
                else
                }
                    SendClientMessage(playerid, COLOR_GREY, "    Vocк nгo foi convidado de absolutamente nada.");
                    return 1;
                }
            }

Espero ter ajudado
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)