05.10.2014, 20:36
Hey all! I found little problem when creating register/login system with Y_ini.
Under OnPlayerDisconnect I'm saving current time with gettime() function but I can't save into file current seconds in timestamps. Here is my code:
Does anyone know how to fix this? I've seen somewhere that saving unix timestamps as strings works but I think it would be easier with integers.
Under OnPlayerDisconnect I'm saving current time with gettime() function but I can't save into file current seconds in timestamps. Here is my code:
pawn Code:
// enum with player's stats
...
pLastVisit
}
// OnPlayerDisconnect:
PlayerInfo[playerid][pLastVisit] = gettime();
SavePlayer(playerid);
// SavePlayer function
INI_WriteInt(file, "LastVisit", PlayerInfo[playerid][pLastVisit]);