Possible to save timer?
#6

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;
}
Not compiled or anything, so there could be some typos
Reply


Messages In This Thread
Possible to save timer? - by cepiokas - 14.10.2009, 16:14
Re: Possible to save timer? - by MenaceX^ - 14.10.2009, 16:16
Re: Possible to save timer? - by shady91 - 14.10.2009, 16:18
Re: Possible to save timer? - by cepiokas - 14.10.2009, 16:21
Re: Possible to save timer? - by cepiokas - 14.10.2009, 16:43
Re: Possible to save timer? - by [nl]daplayer - 14.10.2009, 16:47
Re: Possible to save timer? - by cepiokas - 14.10.2009, 16:56
Re: Possible to save timer? - by [nl]daplayer - 14.10.2009, 17:19

Forum Jump:


Users browsing this thread: 1 Guest(s)