Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
Steamworks.SteamGameServerStats Class Reference

Static Public Member Functions

static bool ClearUserAchievement (CSteamID steamIDUser, string pchName)
 
static bool GetUserAchievement (CSteamID steamIDUser, string pchName, out bool pbAchieved)
 
static bool GetUserStat (CSteamID steamIDUser, string pchName, out int pData)
 
static bool GetUserStat (CSteamID steamIDUser, string pchName, out float pData)
 
static SteamAPICall_t RequestUserStats (CSteamID steamIDUser)
 
static bool SetUserAchievement (CSteamID steamIDUser, string pchName)
 
static bool SetUserStat (CSteamID steamIDUser, string pchName, int nData)
 
static bool SetUserStat (CSteamID steamIDUser, string pchName, float fData)
 
static SteamAPICall_t StoreUserStats (CSteamID steamIDUser)
 
static bool UpdateUserAvgRateStat (CSteamID steamIDUser, string pchName, float flCountThisSession, double dSessionLength)
 

Member Function Documentation

static bool Steamworks.SteamGameServerStats.ClearUserAchievement ( CSteamID  steamIDUser,
string  pchName 
)
inlinestatic
static bool Steamworks.SteamGameServerStats.GetUserAchievement ( CSteamID  steamIDUser,
string  pchName,
out bool  pbAchieved 
)
inlinestatic
static bool Steamworks.SteamGameServerStats.GetUserStat ( CSteamID  steamIDUser,
string  pchName,
out int  pData 
)
inlinestatic

requests stat information for a user, usable after a successful call to RequestUserStats()

static bool Steamworks.SteamGameServerStats.GetUserStat ( CSteamID  steamIDUser,
string  pchName,
out float  pData 
)
inlinestatic
static SteamAPICall_t Steamworks.SteamGameServerStats.RequestUserStats ( CSteamID  steamIDUser)
inlinestatic

downloads stats for the user

returns a GSStatsReceived_t callback when completed

if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail

these stats will only be auto-updated for clients playing on the server. For other

users you'll need to call RequestUserStats() again to refresh any data

static bool Steamworks.SteamGameServerStats.SetUserAchievement ( CSteamID  steamIDUser,
string  pchName 
)
inlinestatic
static bool Steamworks.SteamGameServerStats.SetUserStat ( CSteamID  steamIDUser,
string  pchName,
int  nData 
)
inlinestatic

Set / update stats and achievements.

Note: These updates will work only on stats game servers are allowed to edit and only for

game servers that have been declared as officially controlled by the game creators.

Set the IP range of your official servers on the Steamworks page

static bool Steamworks.SteamGameServerStats.SetUserStat ( CSteamID  steamIDUser,
string  pchName,
float  fData 
)
inlinestatic
static SteamAPICall_t Steamworks.SteamGameServerStats.StoreUserStats ( CSteamID  steamIDUser)
inlinestatic

Store the current data on the server, will get a GSStatsStored_t callback when set.

If the callback has a result of k_EResultInvalidParam, one or more stats

uploaded has been rejected, either because they broke constraints

or were out of date. In this case the server sends back updated values.

The stats should be re-iterated to keep in sync.

static bool Steamworks.SteamGameServerStats.UpdateUserAvgRateStat ( CSteamID  steamIDUser,
string  pchName,
float  flCountThisSession,
double  dSessionLength 
)
inlinestatic

The documentation for this class was generated from the following file: