14.10.2009, 16:47
pawn Код:
new pOnlineTime[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
pOnlineTime[playerid] = GetTickCount();
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new time = pOnlineTime[playerid] - GetTickCount();
// time = the time the player was online in milliseconds.
// Do saving stuff here.
return 1;
}