03.03.2018, 06:45
(NOTE:I'm running everything on my localhost no servers or anything)
So i'm having an issue in this database saver, like when launch the filterscript it launch successfully and saves my stats, and if i relog my stats will stay the same, but when i close samp-server.exe and relaunch it again and join the server, all my stats were gone...
is there anything missing or wrong?
So i'm having an issue in this database saver, like when launch the filterscript it launch successfully and saves my stats, and if i relog my stats will stay the same, but when i close samp-server.exe and relaunch it again and join the server, all my stats were gone...
PHP код:
#define PATH "GoldUser/%s.ini"
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Gold",PlayerInfo[playerid][pGold]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Gold",PlayerInfo[playerid][pGold]);
INI_Close(File);
return 1;
}