How can I check how many hours was player online??
#4

Код:
static n_PlayerOnline[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
  n_PlayerOnline[playerid] = GetTickCount();
}

stock GetOnlineSeconds(playerid)
{
  return GetTickCount() - n_PlayerOnline[playerid] * 1000;
}
That will check seconds. I've made a function in the Useful Functions topic for converting seconds to hours / minutes.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)