No description
Find a file
Astra 3ac24ac3fe 1.0.4c-zio4: chat labels in tags.json
The dead marker and the (T)/(CT)/(SPEC)/(NONE) team-chat labels come from a new optional "chat"
section in tags.json, with colour tags; "" drops a label, and missing keys keep the old defaults.
2026-09-28 20:29:29 +01:00
.github 1.0.4c-zio1: CSS 1.0.375 / net10.0, fixes, SimpleAdmin ranks 2026-09-27 16:23:45 +01:00
.gitattributes Initial commit 2023-11-20 21:20:41 +01:00
.gitignore 1.0.4c-zio1: CSS 1.0.375 / net10.0, fixes, SimpleAdmin ranks 2026-09-27 16:23:45 +01:00
CS2-Tags.cs 1.0.4c-zio4: chat labels in tags.json 2026-09-28 20:29:29 +01:00
CS2-Tags.csproj Build against CounterStrikeSharp 1.0.376 2026-09-27 18:16:48 +01:00
LICENSE Initial commit 2023-11-20 21:20:41 +01:00
README.md 1.0.4c-zio4: chat labels in tags.json 2026-09-28 20:29:29 +01:00
release.sh 1.0.4c-zio1: CSS 1.0.375 / net10.0, fixes, SimpleAdmin ranks 2026-09-27 16:23:45 +01:00

CS2-Tags

Our fork of daffyyyy/CS2-Tags: chat prefixes, name/message colours and scoreboard (clan) tags, assigned by SteamID64, admin group or permission. Built for CounterStrikeSharp 1.0.375 (net10.0) and meant to run alongside CS2-SimpleAdmin.

Changes from upstream 1.0.4c

  • Targets net10.0 / CSS 1.0.375. Uses System.Text.Json, so Newtonsoft.Json no longer ships with it.
  • Config moved to configs/plugins/CS2-Tags/tags.json. The default file uses our SimpleAdmin rank groups. Comments and trailing commas are allowed. A broken file is logged and the previous tags stay in use.
  • Scoreboard tags call SetStateChanged on m_szClan so clients are told about the change.
  • Colour tags like {RED} are only expanded in the config's strings. Players can no longer colour their own chat by typing them.
  • An empty nick_color means the team colour (like normal chat), not whatever colour the prefix ended on.
  • A tag with an empty prefix, nick_color and message_color leaves that player's chat alone (the game prints it), in both all and team chat. The old team_chat key is gone.
  • css_tags_reload works from the server console and for @css/root admins, and reapplies scoreboard tags straight away. Hot reload applies tags to players already connected.
  • Removed css_tag_mute/css_tag_unmute and the @ team-chat admin chat. CS2-SimpleAdmin already does both, and its catch-all command listener runs first. CSS always runs those before per-command listeners, so gagged players' messages never reach this plugin.

Configuration

addons/counterstrikesharp/configs/plugins/CS2-Tags/tags.json, written on first load with a tag for each of our SimpleAdmin rank groups. They use the same abbreviations as SimpleAdmin's staff chat (O, SA, A, TA, M, TM, H, G): [M] name: message in chat, with a white [ ], lime rank and team-coloured name. The scoreboard spells the rank out: Owner, Sen.Admin, Admin, T.Admin, Mod, T.Mod, Helper and Guardian (CS2 adds the brackets itself). An example with other kinds of key:

{
  "tags": {
    "76561198000000000": { "prefix": "{Magenta}[Dev]",               "nick_color": "", "message_color": "", "scoreboard": "Dev" },
    "#rank/owner":       { "prefix": "{Default}[{Lime}O{Default}]",  "nick_color": "", "message_color": "", "scoreboard": "Owner" },
    "#rank/mod":         { "prefix": "{Default}[{Lime}M{Default}]",  "nick_color": "", "message_color": "", "scoreboard": "Mod" },
    "@css/vip":          { "prefix": "{Gold}[VIP]",                  "nick_color": "", "message_color": "", "scoreboard": "VIP" },
    "everyone":          { "prefix": "",                             "nick_color": "", "message_color": "", "scoreboard": "" }
  }
}

Each player gets exactly one tag, picked in this order:

  1. A SteamID64 key matching the player.
  2. The first #group or @permission key the player matches, in file order. Put higher ranks first. @css/root passes every @css/... check, so owners match any permission key.
  3. everyone, if present.

Fields (all optional, empty means "not set"):

  • prefix - shown before the name in chat.
  • nick_color / message_color - colour tags; empty means team colour / default.
  • scoreboard - clan tag on the scoreboard, without brackets (CS2 adds them); empty leaves the player's own clan tag.

The optional chat section sets the labels CS2-Tags adds to the chat lines it prints (only for players whose tag changes their chat). Leave a key out for its default, or set it to "" to drop the label:

"chat": {
  "dead":      "{White}☠",     // before a dead player's line
  "team_t":    "{Yellow}(T)",  // start of team chat, per team
  "team_ct":   "{Blue}(CT)",
  "team_spec": "(SPEC)",
  "team_none": "(NONE)"
}

Colours: any ChatColors field name in braces, case-insensitive, e.g. {Red}, {LightBlue}, {Gold}, {Grey}, plus {TEAMCOLOR}.

Group membership comes from CS2-SimpleAdmin (css_addadmin ... -g, css_addgroup, then css_reloadadmins). After changing ranks or tags.json, run css_tags_reload to reapply scoreboard tags without waiting for a respawn.

Commands

  • css_tags_reload (@css/root or server console) - reload tags.json and reapply scoreboard tags.

Building and releasing

cd plugins/CS2-Tags && ../../build.sh      # output in compiled/CS2-Tags/
FORGEJO_TOKEN=... ./release.sh v<ModuleVersion>

release.sh rebuilds from the committed source and publishes CS2-Tags-<tag>.tar.gz, laid out like game/csgo/, to https://git.zio.sh/cs2/CS2-Tags. The tag must equal v<ModuleVersion> (v1.0.4c-zio4 now).