Raised This Month: $52 Target: $400
 13% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 02-15-2019 , 14:36   Re: [ANY] SteamWorks
Reply With Quote #711

Any guidance how one can get the amount of playtime in a game? (for example csgo)?

SteamWorks_RequestStats
SteamWorks_GetStatCell

Looks like it, but I cannot get it to work

Any tips/example code?
__________________

Last edited by ImACow; 02-15-2019 at 14:37.
ImACow is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-16-2019 , 11:08   Re: [ANY] SteamWorks
Reply With Quote #712

Quote:
Originally Posted by ImACow View Post
Any guidance how one can get the amount of playtime in a game? (for example csgo)?

SteamWorks_RequestStats
SteamWorks_GetStatCell

Looks like it, but I cannot get it to work

Any tips/example code?
The stat name would be different per game, if the game even has a stat for that. CS:GO does - the name you'd use is "total_time_played". The easiest way to look up stat types defined for a game are on SteamDB. https://steamdb.info/app/730/stats/

And just because a game has a stat defined, does not mean that it's used. That said, CS:GO does seem to use most of its stats, including that one. You can check the values you have for them with Steam Achievement Manager. (You can also manually edit your own stats with it, which may allow defeating of your intended purpose).
psychonic is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:37.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode