/faction problem
#1

Hello I got a problem

When I try to add a /faction OOC chat I get "You are not a member of a faction / family !"

pawn Код:
if(strcmp(cmd, "/faction", true) == 0 || strcmp(cmd, "/f", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!(PlayerInfo[playerid][pMember] >= 8 && PlayerInfo[playerid][pMember] <= 10 || PlayerInfo[playerid][pFMember] != 255))
                return SendClientMessage(playerid,COLOR_GREY,"   You are not part of a Faction !");
            if(gFam[playerid]) return 1;
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/f)amily [family chat]");
                return 1;
            }
            if(PlayerInfo[playerid][pMember] >= 8 && PlayerInfo[playerid][pMember] <= 10)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 1)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 2)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 3)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 4)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 5)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 6)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 7)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 8)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 9)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pMember] != 10)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
            else if(PlayerInfo[playerid][pFMember] != 255)
            {
                format(string, sizeof(string), "(( (%d) %s %s: %s ))", PlayerInfo[playerid][pRank],GetPlayerRank(playerid),PlayerName(playerid), result);
                SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
            }
        }
        return 1;
Reply


Messages In This Thread
/faction problem - by seanny - 28.05.2011, 19:51
Re: /faction problem - by seanny - 28.05.2011, 21:22
Re: /faction problem - by seanny - 29.05.2011, 07:53
Re: /faction problem - by TouR - 29.05.2011, 08:47
Re: /faction problem - by seanny - 29.05.2011, 12:21
Re: /faction problem - by MadeMan - 29.05.2011, 12:57
Re: /faction problem - by seanny - 29.05.2011, 13:40

Forum Jump:


Users browsing this thread: 3 Guest(s)