swiftlys2/docs/api/ai/
API Reference SteamAPI

SteamGameServerStats

Class
Namespace: SwiftlyS2.Shared.SteamAPI · Assembly: SwiftlyS2.CS2.dll
public static class SteamGameServerStats
Inherits object
View source

Methods

ClearUserAchievement(CSteamID, string)

public static bool ClearUserAchievement(CSteamID steamIDUser, string pchName)
Parameters
Returns

GetUserAchievement(CSteamID, string, out bool)

public static bool GetUserAchievement(CSteamID steamIDUser, string pchName, out bool pbAchieved)
Parameters
Returns

GetUserStat(CSteamID, string, out int)

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

public static bool GetUserStat(CSteamID steamIDUser, string pchName, out int pData)
Parameters
Returns

GetUserStat(CSteamID, string, out float)

public static bool GetUserStat(CSteamID steamIDUser, string pchName, out float pData)
Parameters
Returns

RequestUserStats(CSteamID)

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

public static SteamAPICall_t RequestUserStats(CSteamID steamIDUser)
Parameters

SetUserAchievement(CSteamID, string)

public static bool SetUserAchievement(CSteamID steamIDUser, string pchName)
Parameters
Returns

SetUserStat(CSteamID, string, int)

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

public static bool SetUserStat(CSteamID steamIDUser, string pchName, int nData)
Parameters
Returns

SetUserStat(CSteamID, string, float)

public static bool SetUserStat(CSteamID steamIDUser, string pchName, float fData)
Parameters
Returns

StoreUserStats(CSteamID)

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.

public static SteamAPICall_t StoreUserStats(CSteamID steamIDUser)
Parameters

UpdateUserAvgRateStat(CSteamID, string, float, double)

public static bool UpdateUserAvgRateStat(CSteamID steamIDUser, string pchName, float flCountThisSession, double dSessionLength)
Parameters
Returns