how to get player total online time ?
#9

Quote:
Originally Posted by ball
Посмотреть сообщение
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.
You can do the same thing for how many seconds the player is afk and subtract it from the original one.

By the way if I remember correctly, the function NetStats_GetConnectedTime does not work in OnPlayerDisconnect callback that's why I suggested unix timestamp.

Avoid timers as much as you can!
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)