SA-MP Forums Archive
/promote - NEED HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /promote - NEED HELP (/showthread.php?tid=47329)



/promote - NEED HELP - kevin974 - 15.08.2008

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.


Re: /promote - NEED HELP - Uhunu - 15.08.2008

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.


Re: /promote - NEED HELP - matt2127 - 15.08.2008

use pLeader


Re: /promote - NEED HELP - kevin974 - 15.08.2008

pLeader? this isent the godfather.


Re: /promote - NEED HELP - matt2127 - 15.08.2008

doesnt mean you cant use it


Re: /promote - NEED HELP - Securityz - 16.08.2008

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


Re: /promote - NEED HELP - kevin974 - 16.08.2008

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


Re: /promote - NEED HELP - nate660 - 16.08.2008

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


Re: /promote - NEED HELP - Uhunu - 16.08.2008

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


Re: /promote - NEED HELP - nate660 - 16.08.2008

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