how make date and time for last login time for user
#3

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:
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;
}
Reply


Messages In This Thread
how make date and time for last login time for user - by kinggta - 16.06.2014, 19:46
Re: how make date and time for last login time for user - by kamiliuxliuxliux - 16.06.2014, 21:38
Re: how make date and time for last login time for user - by Jack_Leslie - 17.06.2014, 00:44
Re: how make date and time for last login time for user - by Snipa - 17.06.2014, 01:27

Forum Jump:


Users browsing this thread: 1 Guest(s)