From a44d10f3a6d9c557efd39a46afe3c4564460eadc Mon Sep 17 00:00:00 2001 From: MSWS Date: Wed, 30 Oct 2024 17:14:21 -0700 Subject: [PATCH] Add coloring --- src/CS2/Leaderboard/LeaderboardCommand.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CS2/Leaderboard/LeaderboardCommand.cs b/src/CS2/Leaderboard/LeaderboardCommand.cs index 1dc108c..04aec2c 100644 --- a/src/CS2/Leaderboard/LeaderboardCommand.cs +++ b/src/CS2/Leaderboard/LeaderboardCommand.cs @@ -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; @@ -21,7 +22,8 @@ public async Task 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;