how to get player total online time ?
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You don't need a timer for that! By using gettime function (without parameters) and storing the unix timestamp on connect, you can get the seconds the player is online by subtracting the unix timestamp from the current gettime with the one you stored on connect. You can then convert seconds to hours, minutes or whatever you want.
With timer you can count player time without afk time, there is better solution to get player time on the server - function NetStats_GetConnectedTime

Код:
new __time = NetStats_GetConnectedTime(playerid) / 1000; //player time on the server in seconds
//here you can save this time
But if you want count player time without afk time you have to create timer and global player variable.
Reply


Messages In This Thread
how to get player total online time ? - by Vaishnav - 25.05.2014, 09:26
Re: how to get player total online time ? - by Ciandlah - 25.05.2014, 09:47
Re: how to get player total online time ? - by Vaishnav - 25.05.2014, 09:56
Re: how to get player total online time ? - by Ciandlah - 25.05.2014, 10:02
Re: how to get player total online time ? - by BroZeus - 25.05.2014, 10:05
Re: how to get player total online time ? - by Konstantinos - 25.05.2014, 10:11
Re: how to get player total online time ? - by ball - 25.05.2014, 10:23
Re: how to get player total online time ? - by Vaishnav - 25.05.2014, 10:31
Re: how to get player total online time ? - by Konstantinos - 25.05.2014, 10:53

Forum Jump:


Users browsing this thread: 1 Guest(s)