14.07.2015, 16:03
Just set up a timer which increases a variable every second/minute.
Like:
You can do the same with minutes of course which is probably better.
Then calculate the hours from the minutes/seconds.
Like:
Код:
new pOnlineTime[MAX_PLAYERS]; SetTimerEx("OnlineTime", 1000, 1, "i", playerid); foward OnlineTime(playerid) public OnlineTime(playerid) { pOnlineTime[playerid]++; return 1; }
Then calculate the hours from the minutes/seconds.