Sandbox Logo
This section and or feature is being worked on right now - so expect even more jank than normal

Access In Game

To access leaderboard information in game, you should first get the leaderboard, like so:
// get a board class for the board in my package called "decapitations"
var board = Sandbox.Services.Leaderboards.Get( "decapitations" );
You can use this object to specify other parameters, like the max entries to take, the SteamId to view (default to you), the group (global, country, friends) and the time period.
// return max 10 entries
board.MaxEntries = 10;

// compare against people in my country
board.Group = "country";
When you're happy, you can query the backend using Refresh()
// fetch entries from backend
await board.Refresh();
After that, information will be accessible on the board object
Log.Info( $"Got board {board.DisplayName}, {board.Title}" );
Log.Info( $"Board has {board.TotalEntries} total entries!" );

// print entries
foreach ( var e in board.Entries )
{
    Log.Info( $"[{e.Rank}] {e.DisplayName} - {e.Value}" );
}
This class is designed so that if you want to update the board at a later date, you can just call Refresh again and it'll update the object.