22.03.2014, 19:08
I'm using this stock to get a certain faction's rank but it's not working(nothing is shown):
pawn Код:
GetFactionRank(playerid)
{
new facrank[24];
new string[24];
if(PlayerInfo[playerid][pFactionRank] == 1)
{
format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank1]);
}
else if(PlayerInfo[playerid][pFactionRank] == 2)
{
format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank2]);
}
else if(PlayerInfo[playerid][pFactionRank] == 3)
{
format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank3]);
}
else if(PlayerInfo[playerid][pFactionRank] == 4)
{
format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank4]);
}
else if(PlayerInfo[playerid][pFactionRank] == 5)
{
format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank5]);
}
else if(PlayerInfo[playerid][pFactionRank] == 6)
{
format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank6]);
}// hmm
switch(PlayerInfo[playerid][pFactionRank])
{
case 1:
facrank = string;
case 2:
facrank = string;
case 3:
facrank = string;
case 4:
facrank = string;
case 5:
facrank = string;
case 6:
facrank = string;
default:
facrank = "None";
}
return facrank;
}