Skip to content

Commit

Permalink
Add coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Oct 31, 2024
1 parent ef422d9 commit a44d10f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CS2/Leaderboard/LeaderboardCommand.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes.Registration;
using CounterStrikeSharp.API.Modules.Utils;
using GangsAPI.Data;
using GangsAPI.Data.Command;
using GangsAPI.Services.Commands;
Expand All @@ -21,7 +22,8 @@ public async Task<CommandResult> Execute(PlayerWrapper? executor,
foreach (var (gangId, score) in cachedLeaderboard) {
var gang = await gangs.GetGang(gangId);
if (gang == null) continue;
info.ReplySync($"{++index} {gang.Name}: {score}");
info.ReplySync(
$"{ChatColors.Orange}{++index}. {ChatColors.Red}{gang.Name}{ChatColors.Grey}: {ChatColors.White}{score}");
}

return CommandResult.SUCCESS;
Expand Down

0 comments on commit a44d10f

Please sign in to comment.