11.11.2013, 02:32
http://pastebin.com/dTXBWvWH
It works if I set it but after server restart it no longer works
It works if I set it but after server restart it no longer works
forward LoadAllFactions();
public LoadAllFactions()
{
for(new i=0;i<MAX_FACTION;i++)
{
new path[40];
format(path,sizeof(path),"/factions/%i.ini",i);
if(fexist(path))
{
INI_ParseFile(path, "LoadFactionData", .bExtra = true, .extra = i);
}
}
return 1;
}
forward LoadFactionData(factionids,name[],value[]);
public LoadFactionData(factionids,name[],value[])
{
INI_String("Name",FactionInfo[factionids][fName],100);
INI_Int("Id",FactionInfo[factionids][factionid]);
INI_String("Rank1",FactionInfo[factionids][rank1],100);
INI_String("Rank2",FactionInfo[factionids][rank2],100);
INI_String("Rank3",FactionInfo[factionids][rank3],100);
INI_String("Rank4",FactionInfo[factionids][rank4],100);
INI_String("Rank5",FactionInfo[factionids][rank5],100);
INI_String("Rank6",FactionInfo[factionids][rank6],100);
INI_String("Rank7",FactionInfo[factionids][rank7],100);
INI_String("Rank8",FactionInfo[factionids][rank8],100);
INI_String("Rank9",FactionInfo[factionids][rank9],100);
INI_String("Rank10",FactionInfo[factionids][rank10],100);
INI_Int("Rank1Skin",FactionInfo[factionids][skinidrank1]);
INI_Int("Rank2Skin",FactionInfo[factionids][skinidrank2]);
INI_Int("Rank3Skin",FactionInfo[factionids][skinidrank3]);
INI_Int("Rank4Skin",FactionInfo[factionids][skinidrank4]);
INI_Int("Rank5Skin",FactionInfo[factionids][skinidrank5]);
INI_Int("Rank6Skin",FactionInfo[factionids][skinidrank6]);
INI_Int("Rank7Skin",FactionInfo[factionids][skinidrank7]);
INI_Int("Rank8Skin",FactionInfo[factionids][skinidrank8]);
INI_Int("Rank9Skin",FactionInfo[factionids][skinidrank9]);
INI_Int("Rank10Skin",FactionInfo[factionids][skinidrank10]);
INI_Float("Spawn X", FactionInfo[factionids][SpawnX]);
INI_Float("Spawn Y", FactionInfo[factionids][SpawnY]);
INI_Float("Spawn Z", FactionInfo[factionids][SpawnZ]);
INI_Bool("Spawn Set",FactionInfo[factionids][SpawnSet]);
return 1;
}