09.08.2010, 00:36
This is how I did it:
On the top-
public OnPlayerDisconnect(playerid, reason)
public OnPlayerSpawn(playerid)
Anywhere-
On the top-
pawn Код:
new TimerOwner[MAX_PLAYERS];
forward TimeOnlineCount(playerid);
pawn Код:
KillTimer(TimerOwner[playerid]);
pawn Код:
//your code.
TimerOwner[playerid] = SetTimerEx("TimeOnlineCount", 60000, 1, "i", playerid); //I use minutes in this.
pawn Код:
public TimeOnlineCount(playerid)
{
File[playerid][TimeOnline]++; //Just replace this to whatever variable you use. Also, if you use an Admin System, add the variable "TimeOnline" or rename it, if you wish.
return 1;
}

