19.08.2012, 21:35
Hi all,
I'm using Y_ini for my saving system and I'm using the Lux Admin script for total online time to use on my own
custom made statistics command. When I join the server, the hours, minutes and seconds show fine but when I disconnect from the server, the "Hours", "Minutes" and "Seconds" don't save, it just shows 0 for each. I know the Lux Admin script uses dini but I don't think that will make a difference. I just wanted it to save the hours, minutes and seconds.
How can I get it to save OnPlayerDisconnect ?
This is what I have under OnPlayerDisconnect:
I am using the exact code from the Lux Admin script so can anyone correct me here ?
I would like this to be corrected ASAP as I have just brought my host.
Thanks,
Sean
I'm using Y_ini for my saving system and I'm using the Lux Admin script for total online time to use on my own
custom made statistics command. When I join the server, the hours, minutes and seconds show fine but when I disconnect from the server, the "Hours", "Minutes" and "Seconds" don't save, it just shows 0 for each. I know the Lux Admin script uses dini but I don't think that will make a difference. I just wanted it to save the hours, minutes and seconds.
How can I get it to save OnPlayerDisconnect ?
This is what I have under OnPlayerDisconnect:
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
new h, m, s;
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Reported",PlayerInfo[playerid][pReported]);
INI_WriteInt(File,"Warnings",PlayerInfo[playerid][pWarnings]);
INI_WriteInt(File,"Kicks",PlayerInfo[playerid][pKicks]);
INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]);
INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
INI_WriteInt(File,"Hours",PlayerInfo[playerid][pHours]);
INI_WriteInt(File,"Minutes",PlayerInfo[playerid][pMinutes]);
INI_WriteInt(File,"Seconds",PlayerInfo[playerid][pSeconds]);
TotalGameTime(playerid, h, m, s);
INI_Close(File);
I would like this to be corrected ASAP as I have just brought my host.
Thanks,
Sean

