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;
}
returns "(null)" when I print it out.
Nevermind, fixed - Issue for others who may get this: Not loading the data correctly from the MySQL database - sorry for the slight mishap.