Get playing time from server
1 Attachment(s)
How can I get played time from server itself? Look at picture.
Server somehow/somewhere saves that, so it don't change after mapchange. How to retrieve it? |
Re: Get playing time from server
Have you tried get_user_time()? I can't remember if that is limited to the time playing the map or the time playing on the server.
|
Re: Get playing time from server
I read in a thread that said it was only getting time from connect to disconnect. So, reseting after map change.
|
Re: Get playing time from server
Disconnect doesn't necessarily happen on mapchange, FM_ClientDisconnect doesn't catch it. At least try it please
|
Re: Get playing time from server
get_user_time doesn't return the full time (it's reset by reconnects or on mapchange).
The time in your screenshot is calculated (and stored) by the steam libraries (steamclient.so/steamclient.dll) in servers without dproto. You shouldn't try to get it from the server because it's much harder than just calculating it yourself with a plugin. But .... if you really want to get it from the server you could do it with orpheu. The way I came up with is by getting the address of the client_t structure and substracting the connect_time member from the last_received member from the netchan_t struct of each client. But as you can see it's overkill and I don't recommend it, unless you have specific reasons to do so. |
| All times are GMT -4. The time now is 12:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.