26.12.2016, 04:17
Here's my saving function
Here's FPath
Problem here is that it doesn't create the .ini file. Yes, I made a 'factions' folder in my scriptfiles
PHP код:
forward SaveFaction(id);
public SaveFaction(id)
{
new file[40];
format(file, sizeof(file), FPath, id);
new INI:File = INI_Open(file);
INI_SetTag(File,"data");
INI_WriteInt(File, "Members",FacInfo[id][fMembers]);
INI_WriteString(File,"Leader",FacInfo[id][fLeader]);
return 1;
}
PHP код:
#define FPath "/factions/%d.ini"