ChatPrefix v1.0.0

Release your plugins here!
User avatar
Project Leader
Posts: 2603
Joined: Sat Jul 07, 2012 1:59 am

ChatPrefix v1.0.0

Postby satoon101 » Sat Apr 21, 2018 12:00 am

ChatPrefix adds prefixes in chat messages for players. For instance, if you want your server's Admins to have a special Admin prefix whenever they send a chat message, this plugin is for you.

The configuration is the same across all games except for CS:GO. CS:GO does not support dynamic colors and only supports a specific set of colors. This is a limitation in the game itself, so there's nothing that can be done to change that.

To create the configuration file, load chat_prefix on the server once and the default file will be created at ../cfg/source-python/chat_prefix.json. Edit the file to your liking. The default for non-CS:GO looks like:

Code: Select all

    "groups": {
        "ADMIN": {
            "prefix": "{WHITE}[{GOLD}Admin{WHITE}]",
            "permission": "chat.admin"
        "CLAN": {
            "prefix": "{WHITE}[{MAROON}G.O.D.S.{WHITE}]",
            "users": [
        "MOD": {
            "prefix": "{WHITE}[{FUCHSIA}Moderator{WHITE}]",
            "permission": "chat.moderator"
        "DONOR": {
            "prefix": "{WHITE}[{PURPLE}Donor{WHITE}]",
            "users": [
    "colors": {
        "GOLD": "175,175,95",
        "MAROON": "128,0,64",
        "FUCHSIA": "253,63,146",
        "PURPLE": "160,32,240"

When defining a group, the list of "users" can include SteamID2, SteamID3, or Steam int64 values. The "permission" value for a group is checked against all user permissions at run-time. For information on permissions, look at these two links: ... /auth.html

A group should have either a users list or a permission, or even both.

You can also define custom colors used in your "prefix" values in the "colors" section. Those are RGB values used to represent the given color. Source.Python comes with several defined colors, but if any of these aren't quite what you want, define your own in the "colors" section. Again, these custom colors are not available in CS:GO.

For CS:GO, you can only use the following to represent colors:
  • \x01 - White
  • \x02 - Red
  • \x03 - Team (based on "index" attribute) - Pale Blue for CTs - Pale Yellow for Ts - White for non-team
  • \x04 - Bright Green
  • \x05 - Pale Green
  • \x06 - Green
  • \x07 - Pale Red
  • \x08 - Grey
  • \x09 - Yellow
  • \x0A - Light Blue
  • \x0B - Blue
  • \x0C - Dark Blue
  • \x0D - Light Blue for SayText2 and Purple for SayText
  • \x0E - Pink
  • \x0F - Dull Red
  • \x10 - Orange

If you have suggestions or notice any bugs for the plugin, please feel free to post them on the issues list:

This plugin has been fully tested on CS:S and CS:GO, but I believe will also work on TF2. I will work to support other games when I have the opportunity.

Thanks, and enjoy :)

Special thanks!
Zeus - for asking about adding prefixes which was the inspiration for me starting on this project.

Current version download
chat_prefix -
(53.47 KiB) Downloaded 140 times

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 2 guests