14.07.2015, 15:53
(
Последний раз редактировалось Crystallize; 23.12.2015 в 13:15.
)
Fixed.
new pOnlineTime[MAX_PLAYERS]; SetTimerEx("OnlineTime", 1000, 1, "i", playerid); foward OnlineTime(playerid) public OnlineTime(playerid) { pOnlineTime[playerid]++; return 1; }
Very ineffcient. Save timestamp at connect (gettime()), subtract from the timestamp at disconnect and then add to the player's total time; e.g. let's say the timestamp when the player joins is 100 and when he leaves it's 500. The player has played for 400 seconds during that session.
|