[Ajuda] Cуdigo muito bugado e mau funcional
#1

Alguйm pode me informar o que tem de erro nesse cуdigo? pois nгo estб funcionando muito bem..

@ajuda ae Jonathan Feitosa e xCR7..

pawn Код:
if (strcmp(cmd, "/convidar", true) == 0)
    {
        if (IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if (!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USE: /convidar [ID/Nome]");
                return true;
            }
            new ftext[20], para1;
            para1 = ReturnUser(tmp);
            if (VagaDisponivel(GetPlayerOrg(playerid)) == 0)
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* A sua organizaзгo estб no limite de membros.");
                return true;
            }
            if (GetPlayerOrg(para1) != 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Esse personagem participa de uma organizaзгo/gangue.");
                return true;
            }
            if (Dominando[para1] == 1)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Jogador estб tentando dominar/conquistar um territуrio.");
                return true;
            }
            if (PlayerInfo[playerid][pLider] == 1){ftext = "Polнcia Militar";}
            else if (PlayerInfo[playerid][pLider] == 2){ftext = "Polнcia Civil";}
            else if (PlayerInfo[playerid][pLider] == 3){ftext = "Exйrcito";}
            else if (PlayerInfo[playerid][pLider] == 4){ftext = "org";}
            else if (PlayerInfo[playerid][pLider] == 5){ftext = "Los Aztecas";}
            else if (PlayerInfo[playerid][pLider] == 6){ftext = "FARC";}
            else if (PlayerInfo[playerid][pLider] == 7){ftext = "Governo";}
            else if (PlayerInfo[playerid][pLider] == 8){ftext = "Hitmans";}
            else if (PlayerInfo[playerid][pLider] == 9){ftext = "San News";}
            else if (PlayerInfo[playerid][pLider] == 10){ftext = "org";}
            else if (PlayerInfo[playerid][pLider] == 11){ftext = "Marinha";}
            else if (PlayerInfo[playerid][pLider] == 12){ftext = "Los Santos Vagos";}
            else if (PlayerInfo[playerid][pLider] == 13){ftext = "org";}
            else if (PlayerInfo[playerid][pLider] == 14){ftext = "Los Sureсos";}
            else if (PlayerInfo[playerid][pLider] == 15){ftext = "Grove Street";}
            else if (PlayerInfo[playerid][pLider] == 16){ftext = "Ballas";}
            else if (PlayerInfo[playerid][pLider] == 17){ftext = "org";}
            if (GetPlayerOrg(playerid) == 1 || GetPlayerOrg(playerid) == 7 || GetPlayerOrg(playerid) == 10)
            {
                if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] == 9 || PlayerInfo[playerid][pCargo] == 8)
                {
                    if (IsPlayerConnected(para1))
                    {
                        if (para1 != INVALID_PLAYER_ID)
                        {
                            format(string, sizeof(string), "* %s estб lhe convidando a faser parte do(a) %s.", GetPlayerNameRP(playerid), ftext);
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Caso queira fazer parte, utilize (( /aceitar convite )).");
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Vocк enviou convite para %s fazer parte de sua %s.", GetPlayerNameRP(para1), Org(playerid));
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            Invite[para1] = 1;
                            InviteOffer[para1] = playerid;
                            InviteJob[para1] = PlayerInfo[playerid][pLider];
                        }
                        return true;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "ID/Nome Invбlido.");
                        return true;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Apenas sub-lнderes e lнderes podem convidar.");
                }
                return true;
            }
            else
            {
                if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] == 6 || PlayerInfo[playerid][pCargo] == 5)
                {
                    if (IsPlayerConnected(para1))
                    {
                        if (para1 != INVALID_PLAYER_ID)
                        {
                            format(string, sizeof(string), "* %s estб lhe convidando a faser parte do(a) %s.", GetPlayerNameRP(playerid), ftext);
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Caso queira fazer parte, utilize (( /aceitar convite )).");
                            SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Vocк enviou convite para %s fazer parte de sua %s.", GetPlayerNameRP(para1), Org(playerid));
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            Invite[para1] = 1;
                            InviteOffer[para1] = playerid;
                            InviteJob[para1] = PlayerInfo[playerid][pLider];
                        }
                        return true;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "ID/Nome Invбlido.");
                        return true;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Apenas sub-lнderes e lнderes podem convidar.");
                }
            }
        }
        return true;
    }

Tipo, ele tб tudo bugado, nгo sei o que ouve com o mesmo..
Reply
#2

Bugado ? Oque acontece ? Nгo funciona ?
Reply
#3

Nгo й funcional, pois й bugado a logica afs..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)