Skip to content

TICHOJEBEC-SK/cs2-Servers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS2 Servers

Loved the tool? Please consider donating 💸 to help it improve!


📜 About the Plugin

A Counter-Strike 2 plugin for CounterStrikeSharp that shows the status of your server network (map, players, slots, online/offline).
Useful for communities with multiple servers.

Servers Plugin Preview

The plugin supports:

  • Configurable command names (servers, etc.)
  • Configurable chat prefix and language
  • Configurable query timeout & cache TTL
  • Language files (en.json, sk.json) for easy localization
  • Safe multithreading – queries are offloaded, chat runs on main thread
  • Automatic broadcast – every X seconds (configurable), a random online server is advertised in chat
  • Option to ignore bots – new CountBots config (default: true)

🔹 Commands

  1. serversShow servers list
    • Displays all configured servers with name, map, player count, and status.
    • If a server is unreachable, shows it as offline.

🛠 Installation

Requirements

Steps

  1. Build the plugin (dotnet build -c Release) or download prebuilt.
  2. Copy the DLL and lang/ folder to:
    /game/csgo/addons/counterstrikesharp/plugins/Servers/
    
  3. Start or restart the server.

⚙️ Configuration

Config is generated on first run:

{
  "ChatPrefix": "[SERVERS]",
  "CommandNames": [ "servers" ],
  "QueryTimeoutMs": 900,
  "CacheTtlSeconds": 5,
  "AdvertIntervalSeconds": 120,
  "Language": "en",
  "CountBots": true,
  "Servers": [
    { "Name": "Public #1", "Address": "127.0.0.1", "Port": 27015 },
    { "Name": "Public #2", "Address": "127.0.0.1", "Port": 27016 }
  ]
}
  • ChatPrefix – text prefix with colors ({green}, {default}, …).
  • CommandNames – command(s) registered for players.
  • QueryTimeoutMs – UDP query timeout in ms (200–5000).
  • CacheTtlSeconds – how long results are cached (0–30s).
  • AdvertIntervalSeconds – how often (in seconds) a random online server is advertised to all players (0 = disabled).
  • Languageen or sk.
  • CountBots – if true, bot players are counted in totals (default: true).
  • Servers – list of endpoints (IP/host + port).

🎨 Colors in translations

You can use color tags in lang/en.json or lang/sk.json:

Example:

"{green}{0}. {white}{1} {grey}| map {lightblue}{2} {grey}| players {white}{3}/{4}"

The {color} tags will be replaced by ChatColors codes automatically.


📩 Contact

  • Discord: tichotm

About

A Counter-Strike 2 plugin for CounterStrikeSharp that allows players to quickly see the status of all community servers (map, players, slots, online/offline) directly in chat. Ideal for multi-server networks.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages