21.06.2015, 22:38
Thats the function RPFRN:
Code:
stock RPFRN(playerid) { new rankname[32]; if(PlayerInfo[playerid][pFacRank] == 0 && PlayerInfo[playerid][pFac] == 0) format(rankname, sizeof(rankname), "Civilian"); else if(PlayerInfo[playerid][pFac]) { //if(PlayerInfo[playerid][pFacRank] == 0) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank0]); if(PlayerInfo[playerid][pFacRank] == 1) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank1]); else if(PlayerInfo[playerid][pFacRank] == 2) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank2]); else if(PlayerInfo[playerid][pFacRank] == 3) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank3]); else if(PlayerInfo[playerid][pFacRank] == 4) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank4]); else if(PlayerInfo[playerid][pFacRank] == 5) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank5]); else if(PlayerInfo[playerid][pFacRank] == 6) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank6]); else if(PlayerInfo[playerid][pFacRank] == 7) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank7]); else if(PlayerInfo[playerid][pFacRank] == 8) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank8]); else if(PlayerInfo[playerid][pFacRank] == 9) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank9]); else if(PlayerInfo[playerid][pFacRank] == 10) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pFac]][fRank10]); } return rankname; }