Skip to content

Commit

Permalink
fix: wrong chat colors
Browse files Browse the repository at this point in the history
  • Loading branch information
roflmuffin committed Nov 24, 2023
1 parent 9a018f2 commit 7e9e7c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 5 additions & 4 deletions managed/CounterStrikeSharp.API/Modules/Utils/ChatColors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ public class ChatColors
public static char White = '\x01';
public static char Darkred = '\x02';
public static char Green = '\x04';
public static char LightYellow = '\x03';
public static char LightBlue = '\x03';
public static char LightYellow = '\x09';
public static char LightBlue = '\x0B';
public static char Olive = '\x05';
public static char Lime = '\x06';
public static char Red = '\x07';
public static char Purple = '\x03';
public static char LightPurple = '\x03';
public static char Purple = '\x0E';
public static char Grey = '\x08';
public static char Yellow = '\x09';
public static char Gold = '\x10';
public static char Silver = '\x0A';
public static char Blue = '\x0B';
public static char DarkBlue = '\x0C';
public static char BlueGrey = '\x0D';
public static char BlueGrey = '\x0A';
public static char Magenta = '\x0E';
public static char LightRed = '\x0F';
}
Expand Down
12 changes: 12 additions & 0 deletions managed/TestPlugin/TestPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,18 @@ public void OnCommandGuns(CCSPlayerController? player, CommandInfo command)
command.ReplyToCommand(weapon.Value.DesignerName);
}
}

[ConsoleCommand("css_colors", "List Chat Colors")]
public void OnCommandColors(CCSPlayerController? player, CommandInfo command)
{
if (player == null) return;
if (!player.PlayerPawn.IsValid) return;

for (int i = 0; i < 16; i++)
{
command.ReplyToCommand($" {(char)i}Color 0x{i:x}");
}
}

[ConsoleCommand("css_pause", "Pause Game")]
public void OnCommandPause(CCSPlayerController? player, CommandInfo command)
Expand Down

0 comments on commit 7e9e7c6

Please sign in to comment.