Added servers stats ClearAchievement, GetAchievement

This commit is contained in:
Garry Newman 2018-02-15 13:43:07 +00:00
parent 727741b81a
commit 3895fd33aa

View File

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