02.04.2014, 02:34
pawn Код:
stock GetFactionRank(playerid)
{
new rank[24];
if(Player[playerid][FactionRank] == 0)rank = "n/a";
else if(Player[playerid][FactionRank] == 1)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankOne]);
else if(Player[playerid][FactionRank] == 2)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankTwo]);
else if(Player[playerid][FactionRank] == 3)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankThree]);
else if(Player[playerid][FactionRank] == 4)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankFour]);
else if(Player[playerid][FactionRank] == 5)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankFive]);
else if(Player[playerid][FactionRank] == 6)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankSix]);
else if(Player[playerid][FactionRank] == 7)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankSeven]);
return rank;
}
pawn Код:
print(GetFactionRank(playerid));