/giverank command bug
#1

I'm having a problem with a /giverank command.

For some reason, any player can give himself a rank in any organization (even a civilian can give himself a rank, like the civilians are an organization !!!)

I really need some help, here is the command:

Код:
	if(strcmp(cmd, "/giverank", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_DGOLD, "Use: /giverank [playerid/PartOfName] [Number(1-6)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(PlayerInfo[para1][pLeader] < 0)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: You can't change the rank of leaders!");
				return 1;
			}
            if(level > 6 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " SERVER: The ranks are between 1 and 6!"); return 1; }
            {
            if(PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[para1][pMember] != 1)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: Nemozete dati rank igracu koji nije u vasoj organizaciji.");
				return 1;
			}
            if(PlayerInfo[playerid][pLeader] == 2 && PlayerInfo[para1][pMember] != 2)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 3 && PlayerInfo[para1][pMember] != 3)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 4 && PlayerInfo[para1][pMember] != 4)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 5 && PlayerInfo[para1][pMember] != 5)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 6 && PlayerInfo[para1][pMember] != 6)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 7 && PlayerInfo[para1][pMember] != 7)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 8 && PlayerInfo[para1][pMember] != 8)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 9 && PlayerInfo[para1][pMember] != 9)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
			if(PlayerInfo[playerid][pLeader] == 11 && PlayerInfo[para1][pMember] != 11)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				return 1;
			}
Reply


Messages In This Thread
/giverank command bug - by The One - 09.03.2012, 23:33
Re: /giverank command bug - by Shabi RoxX - 10.03.2012, 04:09
Re: /giverank command bug - by The One - 10.03.2012, 10:36
Re: /giverank command bug - by CAR - 10.03.2012, 11:40
Re: /giverank command bug - by The One - 10.03.2012, 11:55
Re: /giverank command bug - by Reklez - 10.03.2012, 11:59
Re: /giverank command bug - by CAR - 10.03.2012, 12:03
Re: /giverank command bug - by The One - 10.03.2012, 12:34
Re: /giverank command bug - by The One - 10.03.2012, 20:54
Re: /giverank command bug - by [ABK]Antonio - 10.03.2012, 22:21

Forum Jump:


Users browsing this thread: 2 Guest(s)