15.03.2014, 23:01
So, I've been making my faction system, but then some stuff occured. I can't seem to load faction stats into the game.
Saving works, but as loading fails to, everything get set back to 0 when the files get saved.
My code:
Saving works, but as loading fails to, everything get set back to 0 when the files get saved.
My code:
pawn Код:
INI:HIT[tag](factionid, name[], value[])
{
INI_Int("Members", FactionInfo[9][fMembers]);
INI_String("Motto", FactionInfo[9][fMotd], 128);
INI_Int("Bank", FactionInfo[9][fBank]);
INI_Float("x", FactionInfo[9][fHQx]);
INI_Float("y", FactionInfo[9][fHQy]);
INI_Float("z", FactionInfo[9][fHQz]);
INI_Float("intx", FactionInfo[9][fHQIntx]);
INI_Float("inty", FactionInfo[9][fHQInty]);
INI_Float("intz", FactionInfo[9][fHQIntz]);
INI_Int("intInterior", FactionInfo[9][fHQInterior]);
return 0;
}
stock LoadFactions()
{
new file9[20];
format(file9, sizeof(file9), "Factions/HIT.ini");
INI_Load(file9, .bLocal = false);
}