Quote:
Originally Posted by ImACow
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).