17.06.2014, 00:44
Refer to:
https://sampwiki.blast.hk/wiki/Getdate
https://sampwiki.blast.hk/wiki/Gettime
If you want us to make the code for you, we need to know what file system you\'re using. How ever for an example, it would all look something like this:
https://sampwiki.blast.hk/wiki/Getdate
https://sampwiki.blast.hk/wiki/Gettime
If you want us to make the code for you, we need to know what file system you\'re using. How ever for an example, it would all look something like this:
pawn Code:
enum pData {
LastLoginD,
LastLoginM,
LastLoginY,
LastLoginH,
LastLoginM,
LastLoginS
}
new PlayerData[MAX_PLAYERS][pData];
public OnPlayerDisconnect(playerid, reason)
{
new day,year,month,hour,minute,second;
getdate(year,month,day);
gettime(hour,minute,second);
PlayerData[playerid][LastLoginD] = day;
PlayerData[playerid][LastLoginM] = month;
PlayerData[playerid][LastLoginY] = year;
PlayerData[playerid][LastLoginH] = hour;
PlayerData[playerid][LastLoginM] = minute;
PlayerData[playerid][LastLoginS] = second;
return 1;
}