27.03.2014, 18:07
Could someone help me as to why my faction ranks aren't loading?
This is my callback of getting the faction ranks.
pawn Код:
forward LoadFactions_Faction(facid,name[],value[]);
public LoadFactions_Faction(facid,name[],value[])
{
INI_String("Name", FacInfo[facid][fName], 35);
INI_Float("IntX", FacInfo[facid][IntX]);
INI_Float("IntY", FacInfo[facid][IntY]);
INI_Float("IntZ", FacInfo[facid][IntZ]);
INI_Float("ExtX", FacInfo[facid][ExtX]);
INI_Float("ExtY", FacInfo[facid][ExtY]);
INI_Float("ExtZ", FacInfo[facid][ExtZ]);
INI_Int("Interior", FacInfo[facid][fInterior]);
INI_String("Rank1", FacInfo[facid][fRank1], 24);
INI_String("Rank2", FacInfo[facid][fRank2], 24);
INI_String("Rank3", FacInfo[facid][fRank3], 24);
INI_String("Rank4", FacInfo[facid][fRank4], 24);
INI_String("Rank5", FacInfo[facid][fRank5], 24);
INI_String("Rank6", FacInfo[facid][fRank6], 24);
INI_Int("Type", FacInfo[facid][fType]);
INI_Int("Vault", FacInfo[facid][fVault]);
INI_Int("Materials", FacInfo[facid][fMaterials]);
INI_Int("Weed", FacInfo[facid][fWeed]);
INI_Int("Cocaine", FacInfo[facid][fCocaine]);
return 1;
}
Код:
GetFactionRank(playerid) { new string[24]; switch(PlayerInfo[playerid][pFactionRank]) { case 1: format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank1]); case 2: format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank2]); case 3: format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank3]); case 4: format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank4]); case 5: format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank5]); case 6: format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank6]); default: string = "None"; } return string; }