Server's Uptime & Players last online time
#4

1) Save a unix time stamp in OnGameModeInit in a variable and then to get the uptime just get the current timestamp and subtract the startup timestamp from it, and you'll get the uptime in seconds (give or take 1 or 2 seconds).

2) Just create a MySQL query that saves their time when they logout on OnPlayerDisconnect using, again - best way a unix timestamp, since it is easy to convert it into different time formats.
Reply


Messages In This Thread
Server's Uptime & Players last online time - by Luis- - 31.07.2011, 03:57
Re: Server's Uptime & Players last online time - by Lorenc_ - 31.07.2011, 03:59
Re: Server's Uptime & Players last online time - by Luis- - 31.07.2011, 04:00
Re: Server's Uptime & Players last online time - by iLinx - 31.07.2011, 04:03
Re: Server's Uptime & Players last online time - by Luis- - 31.07.2011, 04:22
Re: Server's Uptime & Players last online time - by dowster - 31.07.2011, 04:44
Re: Server's Uptime & Players last online time - by iLinx - 31.07.2011, 17:43
Re: Server's Uptime & Players last online time - by Calgon - 31.07.2011, 17:45

Forum Jump:


Users browsing this thread: 2 Guest(s)