08.02.2014, 13:39
(
Последний раз редактировалось mirou123; 08.02.2014 в 18:31.
)
Hey I am trying to save a faction's stats into a file then load it when the server restarts The saving works fine but when I restart the server two times the values will be set to 0 again and I think that happens because the server is not loading.
This is what I am using to save
And ofc I call that function OnGameModeExit so can anyone help me to load the file OnGameModeInit?Thank you in advance
This is what I am using to save
Код:
stock SaveLSPDData()
{
new INI:LSPD = INI_Open("Factions/LSPD.ini");
INI_SetTag(LSPD, "Los Santos Police Department");
INI_WriteString(LSPD, "Chief", LSPDVar[FactionLeader]);
INI_WriteInt(LSPD, "Money", LSPDVar[FactionMoney]);
INI_WriteInt(LSPD, "Drugs", LSPDVar[FactionDrugs]);
INI_WriteInt(LSPD, "Weapons", LSPDVar[Factionguns]);
INI_WriteInt(LSPD, "MembersCount", LSPDVar[FactionMembers]);
INI_WriteInt(LSPD, "ArrestsCount", LSPDVar[FactionArrests]);
INI_WriteInt(LSPD, "KillsCount", LSPDVar[FactionKills]);
INI_WriteInt(LSPD, "DeathsCount", LSPDVar[FactionDeaths]);
INI_Close(LSPD);
return 1;
}

