diff --git a/Facepunch.Steamworks/Server/Stats.cs b/Facepunch.Steamworks/Server/Stats.cs index 0a28aa4..2238205 100644 --- a/Facepunch.Steamworks/Server/Stats.cs +++ b/Facepunch.Steamworks/Server/Stats.cs @@ -111,5 +111,26 @@ public float GetFloat( ulong steamid, string name, float defaultValue = 0 ) return data; } + + /// + /// Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first. + /// + public bool ClearAchievement( ulong steamid, string name ) + { + return server.native.gameServerStats.ClearUserAchievement( steamid, name ); + } + + /// + /// Return true if available, exists and unlocked + /// + public bool GetAchievement( ulong steamid, string name ) + { + bool achieved = false; + + if ( !server.native.gameServerStats.GetUserAchievement( steamid, name, ref achieved ) ) + return false; + + return achieved; + } } }