08.03.2018, 17:33
So I have this little snippet out of my stats command, basically my issue is that everyone have the same online time,
Also, let's say there are 2 players in-game.
I played for 1 hour, he played for 1 hour too,
I reconnect so I'm gonna have it all resetted(as it's suppose to be), but the first player's online time will be resetted too
Also, let's say there are 2 players in-game.
I played for 1 hour, he played for 1 hour too,
I reconnect so I'm gonna have it all resetted(as it's suppose to be), but the first player's online time will be resetted too
Код:
format(iString,sizeof(iString),"{ffff99}Online Time: %d hours | %d minutes | %d seconds", hours, minutes, seconds); SendClientMessage(playerid, -1, iString); } return 1; } stock GetPlayerConnectedTime(playerid, &hours, &minutes, &seconds) { new onlinetime = NetStats_GetConnectedTime(playerid); seconds = (onlinetime / 1000) % 60; minutes = (onlinetime / (1000 * 60)) % 60; hours = (onlinetime / (1000 * 60 * 60)); return 1; }