10.03.2012, 10:36
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; } }