18.10.2013, 16:32
Under onplayerconnect, make a variable and do this
then under OnPlayerDisconnect,
now this difference gives the no of secs played by player in this session. Each time, add this to the existing time (MAKE SURE YOU DO NOT OVERWRITE IT, BUT ADD IT) after retreiving it. Then, divide by 3600, floatround to get the hours played, for mins, divide by 60 and floatround, for seconds, just use
to get the secs and display it.. Hope you understood.
pawn Код:
playerJOINtime[playerid] = gettime();
pawn Код:
Player total time played this session = gettime() - playerJOINtime[playerid]
pawn Код:
secs = totaltime % 60