/promote - NEED HELP
#1

pawn Код:
if(strcmp(cmd, "/promote", true) ==0 )
    {
      if(PLAYERLIST_authed[playerid] == 1)
      {
        tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /promote [id]");
                return 1;
            }
            new para1 = ReturnUser(tmp);
        new faction;
        if(PlayerInfo[playerid][pMember] == faction)
        {
          if(PLAYERLIST_authed[para1] == 1)
          {
            if(PlayerInfo[para1][pMember] == faction)
                {
                PlayerInfo[para1][pRank] ++;
                new string[256];
                format(string, sizeof(string), ".: %s has been promoted by %s. Rank %d :.", GetName(para1),GetName(playerid),PlayerInfo[para1][pRank]);
                        SendClientMessage(playerid, COLOR_ADMIN_TP, string);
                        OnPlayerFactionSpawn(playerid);
                }
        }
        }
        }
        return 1;
    }
How do i make it so the person doing the command can only rank up the person in his faction and not someone else in a diffrent faction.
Reply
#2

Maybe you could check on the promoting which faction the promoter is in, and then the script will see if the promoted and the promoter's faction matches. If it's true, it will promote. If it's false, error.
Reply
#3

use pLeader
Reply
#4

pLeader? this isent the godfather.
Reply
#5

doesnt mean you cant use it
Reply
#6

Even if it's not GodFather, you can define it.
Reply
#7

yes i know, but really i dont want to. I think i have figured it out.
Reply
#8

Just add a simple check to see what team there on ?
Reply
#9

Kevin, if you have figured it out, please post here how you did, so other users can search and find answer to their problem.
Reply
#10

Quote:
Originally Posted by Tom Frost
Kevin, if you have figured it out, please post here how you did, so other users can search and find answer to their problem.
Some of the half decent members here search, And other peope just post there damn questions here,

Any way i reply with the link to the search button
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)