Online time
#1

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

Код:
		 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 on‌linetime = NetStats_GetConnectedTime(playerid);
   seconds = (onlinetime / 1000) % 60;
   minutes = (onlinetime / (1000 * 60)) % 60;
   hours = (onlinetime / (1000 * 60 * 60));
   return 1;
}
Reply


Messages In This Thread
Online time - by ivndosos - 08.03.2018, 17:33
Re: Online time - by jasperschellekens - 08.03.2018, 17:46
Re: Online time - by ivndosos - 08.03.2018, 17:49
Re: Online time - by jasperschellekens - 08.03.2018, 18:49
Re: Online time - by Sew_Sumi - 08.03.2018, 20:18

Forum Jump:


Users browsing this thread: 1 Guest(s)