/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
#2

This is Not a Full Command.... Post Full codes FIRST.
Reply
#3

Here is the full code:

Код:
	if(strcmp(cmd, "/giverank", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_DGOLD, "Koristite: /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 set ranks to a leader!");
				return 1;
			}
            if(level > 6 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " SERVER: Organizacija ima rank od 1 do 6."); return 1; }
            {
            if(PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[para1][pMember] != 1)
			{
			    SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
				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;
			}
			if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pLeader] <= 9)
			{
				if(IsPlayerConnected(para1))
				{
					if(para1 != INVALID_PLAYER_ID)
					{
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pRank] = level;
						format(string, sizeof(string), "ORG INFO: You have been promoted to rank %d by your leader %s.", level, sendername);
					    SendClientMessage(para1, COLOR_GOLD, string);
						format(string, sizeof(string), "LEADER INFO: You have given rank %d to a member %s.", level, giveplayer);
						SendClientMessage(playerid, COLOR_GOLD, string);
						if(PlayerInfo[playerid][pLeader] == 1)
						{
							if(PlayerInfo[para1][pSex] == 1)//pd
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 280; SetPlayerSkin(para1, 280); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 280; SetPlayerSkin(para1, 280); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 281; SetPlayerSkin(para1, 281); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 281; SetPlayerSkin(para1, 281); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 282; SetPlayerSkin(para1, 282); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 282; SetPlayerSkin(para1, 282); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 2) //BB Street Racer's
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 50; SetPlayerSkin(para1, 50); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 50; SetPlayerSkin(para1, 50); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 29; SetPlayerSkin(para1, 29); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 29; SetPlayerSkin(para1, 29); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 217; SetPlayerSkin(para1, 217); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 217; SetPlayerSkin(para1, 217); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 3)//Y Street Racer's
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 59; SetPlayerSkin(para1, 59); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 59; SetPlayerSkin(para1, 59); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 120; SetPlayerSkin(para1, 120); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 120; SetPlayerSkin(para1, 120); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 186; SetPlayerSkin(para1, 186); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 186; SetPlayerSkin(para1, 186); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//GH Street Racer's
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 122; SetPlayerSkin(para1, 122); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 122; SetPlayerSkin(para1, 122); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 101; SetPlayerSkin(para1, 101); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 101; SetPlayerSkin(para1, 101); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 241; SetPlayerSkin(para1, 241); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 241; SetPlayerSkin(para1, 241); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 5)//PT Street Racer's
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 179; SetPlayerSkin(para1, 179); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 179; SetPlayerSkin(para1, 179); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 206; SetPlayerSkin(para1, 206); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 206; SetPlayerSkin(para1, 206); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 202; SetPlayerSkin(para1, 202); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 202; SetPlayerSkin(para1, 202); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 6) //Aztecas Gang
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 114; SetPlayerSkin(para1, 114); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 114; SetPlayerSkin(para1, 114); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 116; SetPlayerSkin(para1, 116); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 116; SetPlayerSkin(para1, 116); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 115; SetPlayerSkin(para1, 115); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 115; SetPlayerSkin(para1, 115); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 41; SetPlayerSkin(para1, 41);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 7)//Vagos Gang
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 30; SetPlayerSkin(para1, 30); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 30; SetPlayerSkin(para1, 30); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 110; SetPlayerSkin(para1, 110); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 110; SetPlayerSkin(para1, 110); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 109; SetPlayerSkin(para1, 109); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 109; SetPlayerSkin(para1, 109); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 8)//Grove Street Families
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 107; SetPlayerSkin(para1, 107); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 107; SetPlayerSkin(para1, 107); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 105; SetPlayerSkin(para1, 105); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 105; SetPlayerSkin(para1, 105); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 271; SetPlayerSkin(para1, 271); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 271; SetPlayerSkin(para1, 271); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
						else if(PlayerInfo[playerid][pLeader] == 9)//Bloods Gang
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 102; SetPlayerSkin(para1, 102); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 102; SetPlayerSkin(para1, 102); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 103; SetPlayerSkin(para1, 103); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 103; SetPlayerSkin(para1, 103); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 104; SetPlayerSkin(para1, 104); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 104; SetPlayerSkin(para1, 104); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}

                        else if(PlayerInfo[playerid][pLeader] == 11)//Hitman Agency
						{
							if(PlayerInfo[para1][pSex] == 1)
							{
								//Male Skin
								if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 163; SetPlayerSkin(para1, 112); }
								else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 112; SetPlayerSkin(para1, 112); }
								else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 127; SetPlayerSkin(para1, 127); }
								else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 127; SetPlayerSkin(para1, 127); }
								else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 166; SetPlayerSkin(para1, 166); }
								else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 166; SetPlayerSkin(para1, 166); }
							}
							else if(PlayerInfo[para1][pSex] == 2)
							{
								PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
							}
						}
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "[Greљka!]{FFFFFF} You are not a leader of any organization!");
			}
		}
		return 1;
	}
	}
Reply
#4

I didn't need the full code
Add this under:
pawn Код:
new para1;
new level;
para1 = ReturnUser(tmp);
if(para1 == playerid) return SendClientMessage(playerid, 0xFF0000FF, "You can't rank yourself!!");
Reply
#5

Still not working.

Just tested it out with my bro. He can still give himself ranks, even though he is not a leader.
Reply
#6

use sscanf2 than strtok, strtok is old. sscanf2 is new.

sscanf2 can be download here!
Reply
#7

Replace this:
pawn Код:
if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pLeader] <= 9)
With this:
pawn Код:
if (PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[playerid][pLeader] <= 9)
Reply
#8

CAR, it's still not working.
Reply
#9

BUMP, can someone help me please ?
Reply
#10

pawn Код:
if(strcmp(cmd, "/giverank", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_DGOLD, "Koristite: /giverank [playerid/PartOfName] [Number(1-6)]");
        new para1;
        new level;
        para1 = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        level = strval(tmp);
       
        //===========[Error Checking]===========\\
        if(PlayerInfo[playerid][pLeader] < 1) return SendClientMessage(playerid, COLOR_GREY, "You aren't a leader!");
        if(PlayerInfo[para1][pLeader] > 0) return SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: You can't set ranks to a leader!");
        if(level > 6 || level < 0) return SendClientMessage(playerid, COLOR_GREY, " SERVER: Organizacija ima rank od 1 do 6.");
        if(PlayerInfo[playerid][pLeader] != PlayerInfo[para1][pMember]) return SendClientMessage(playerid, COLOR_GOLD, "LEADER INFO: That player is not in your organization!");
        if(para1 == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't rank yourself!!");
        if(para1 != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid player!");
        if(!IsPlayerConnected(para1)) return SendClientMessage(playerid, COLOR_GREY, "Player not connected!");
        //======================================\\

        if(PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[playerid][pLeader] <= 9 || PlayerInfo[playerid][pLeader] == 11) //Not sure if you want/have hitman leader - you can take it out or whatever
        {
            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            PlayerInfo[para1][pRank] = level;
            format(string, sizeof(string), "ORG INFO: You have been promoted to rank %d by your leader %s.", level, sendername);
            SendClientMessage(para1, COLOR_GOLD, string);
            format(string, sizeof(string), "LEADER INFO: You have given rank %d to a member %s.", level, giveplayer);
            SendClientMessage(playerid, COLOR_GOLD, string);
           
            switch(PlayerInfo[playerid][pLeader])
            {
                case 1: //pd
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 280; SetPlayerSkin(para1, 280); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 280; SetPlayerSkin(para1, 280); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 281; SetPlayerSkin(para1, 281); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 281; SetPlayerSkin(para1, 281); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 282; SetPlayerSkin(para1, 282); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 282; SetPlayerSkin(para1, 282); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 2: //BB Street Racer's
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 50; SetPlayerSkin(para1, 50); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 50; SetPlayerSkin(para1, 50); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 29; SetPlayerSkin(para1, 29); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 29; SetPlayerSkin(para1, 29); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 217; SetPlayerSkin(para1, 217); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 217; SetPlayerSkin(para1, 217); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 3: //Y Street Racer's
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 59; SetPlayerSkin(para1, 59); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 59; SetPlayerSkin(para1, 59); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 120; SetPlayerSkin(para1, 120); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 120; SetPlayerSkin(para1, 120); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 186; SetPlayerSkin(para1, 186); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 186; SetPlayerSkin(para1, 186); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 4: //GH Street Racer's
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 122; SetPlayerSkin(para1, 122); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 122; SetPlayerSkin(para1, 122); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 101; SetPlayerSkin(para1, 101); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 101; SetPlayerSkin(para1, 101); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 241; SetPlayerSkin(para1, 241); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 241; SetPlayerSkin(para1, 241); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 5: //PT Street Racer's
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 179; SetPlayerSkin(para1, 179); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 179; SetPlayerSkin(para1, 179); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 206; SetPlayerSkin(para1, 206); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 206; SetPlayerSkin(para1, 206); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 202; SetPlayerSkin(para1, 202); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 202; SetPlayerSkin(para1, 202); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 6: //Aztecas Gang
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 114; SetPlayerSkin(para1, 114); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 114; SetPlayerSkin(para1, 114); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 116; SetPlayerSkin(para1, 116); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 116; SetPlayerSkin(para1, 116); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 115; SetPlayerSkin(para1, 115); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 115; SetPlayerSkin(para1, 115); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 41; SetPlayerSkin(para1, 41);
                    }
                }
                case 7: //Vagos gang
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 30; SetPlayerSkin(para1, 30); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 30; SetPlayerSkin(para1, 30); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 110; SetPlayerSkin(para1, 110); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 110; SetPlayerSkin(para1, 110); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 109; SetPlayerSkin(para1, 109); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 109; SetPlayerSkin(para1, 109); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 8://Grove Street Families
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 107; SetPlayerSkin(para1, 107); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 107; SetPlayerSkin(para1, 107); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 105; SetPlayerSkin(para1, 105); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 105; SetPlayerSkin(para1, 105); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 271; SetPlayerSkin(para1, 271); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 271; SetPlayerSkin(para1, 271); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 9://Bloods gang
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 102; SetPlayerSkin(para1, 102); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 102; SetPlayerSkin(para1, 102); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 103; SetPlayerSkin(para1, 103); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 103; SetPlayerSkin(para1, 103); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 104; SetPlayerSkin(para1, 104); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 104; SetPlayerSkin(para1, 104); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
                case 11://Hitman
                {
                    if(PlayerInfo[para1][pSex] == 1)
                    {
                        //Male Skin
                        if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 163; SetPlayerSkin(para1, 112); }
                        else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 112; SetPlayerSkin(para1, 112); }
                        else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 127; SetPlayerSkin(para1, 127); }
                        else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 127; SetPlayerSkin(para1, 127); }
                        else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 166; SetPlayerSkin(para1, 166); }
                        else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 166; SetPlayerSkin(para1, 166); }
                    }
                    else if(PlayerInfo[para1][pSex] == 2)
                    {
                        PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
                    }
                }
            }
        }
        else return SendClientMessage(playerid, COLOR_RED, "[Greška!]{FFFFFF} You are not a leader of any organization!");
        return 1;
    }
How about this?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)