Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
feat: Use rank colors in toplist (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
K4ryuu committed Nov 17, 2023
1 parent 3d1de10 commit 50fb58a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public async void PrintTopXPlayers(CCSPlayerController player, int number)
{
int pointCheck = result.Get<int>(i, "points");
string playerRank = noneRank;
string rankColor = $"{ChatColors.Default}";

foreach (var kvp in ranks)
{
Expand All @@ -118,7 +119,7 @@ public async void PrintTopXPlayers(CCSPlayerController player, int number)

Log($"Printing player {i + 1} - Name: {result.Get<string>(i, "name")}, Points: {result.Get<int>(i, "points")}, Rank: {playerRank}", LogLevel.Debug);

player.PrintToChat($" {ChatColors.Gold}{i + 1}. {ChatColors.Blue}[{playerRank}] {ChatColors.Gold}{result.Get<string>(i, "name")} - {ChatColors.Blue}{result.Get<int>(i, "points")} points");
player.PrintToChat($" {ChatColors.Gold}{i + 1}. {rankColor}[{playerRank}] {ChatColors.Gold}{result.Get<string>(i, "name")} - {ChatColors.Blue}{result.Get<int>(i, "points")} points");
}
}
else
Expand Down

0 comments on commit 50fb58a

Please sign in to comment.