mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 14:15:47 +03:00
Added servers stats ClearAchievement, GetAchievement
This commit is contained in:
parent
727741b81a
commit
3895fd33aa
@ -111,5 +111,26 @@ public float GetFloat( ulong steamid, string name, float defaultValue = 0 )
|
|||||||
|
|
||||||
return data;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user