Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CS:GO Panel Status

A SourceMod plugin that tracks live player data and exports it to a formatted JSON file. This is particularly useful for web panels, Discord bots, or external server monitoring tools that need to fetch real-time player statistics (SteamID, IP, Country, Session Time, and Ping).

✨ Features

  • JSON Data Export: Automatically writes live server data to a .json file at a customizable interval.
  • GeoIP Integration: Automatically resolves player IPs to their respective 2-letter country codes.
  • Session Tracking: Accurately calculates how long each player has been connected to the server.
  • Silent Mode: Allows admins or automated scripts to trigger a JSON write without spamming the server console.
  • Safe String Escaping: Automatically escapes special characters in player names to prevent broken JSON files.

πŸ“‹ Requirements

  • SourceMod (v1.10 or newer recommended)
  • GeoIP Extension (Included with SourceMod by default)

πŸš€ Installation

  1. Compile the .sp file or download the compiled .smx file.
  2. Place the csgo_panel_status.smx (or whatever you named it) into your addons/sourcemod/plugins/ directory.
  3. Restart your server or load the plugin manually via the server console: sm plugins load csgo_panel_status
  4. A configuration file will automatically be generated at cfg/sourcemod/panel_status.cfg upon first load.

πŸ’» Commands

Command Admin Flag Description
sm_panel_status ADMFLAG_GENERIC (b) Prints the player list to your console and triggers a manual JSON export.
sm_panel_status silent ADMFLAG_GENERIC (b) Forces a JSON export without printing anything to the console. Great for cron jobs.

βš™οΈ Configuration (ConVars)

You can edit these values in cfg/sourcemod/panel_status.cfg.

  • sm_panel_write_enabled (Default: 1)
    • 1 = Enables writing to the JSON file.
    • 0 = Disables JSON writing.
  • sm_panel_output_file (Default: "status.json")
    • The name of the generated JSON file.
    • Note: The file is always generated inside the addons/sourcemod/data/ folder.
  • sm_panel_write_interval (Default: 10.0)
    • How often (in seconds) the plugin should automatically update the JSON file.
    • Set to 0 to disable the timer and update only when the sm_panel_status command is used.

πŸ“„ Example JSON Output

The exported file (addons/sourcemod/data/status.json) will look like this:

{
  "TimeUtc": "2023-10-27T14:30:00Z",
  "PlayerCount": 2,
  "Players": [
    {
      "UserId": 4,
      "Name": "PlayerOne",
      "SteamId": "STEAM_1:0:12345678",
      "Ip": "192.168.1.1",
      "Country": "US",
      "Ping": 45,
      "SessionSeconds": 3650,
      "SessionTime": "01:00:50"
    },
    {
      "UserId": 5,
      "Name": "PlayerTwo",
      "SteamId": "STEAM_1:1:87654321",
      "Ip": "10.0.0.1",
      "Country": "TR",
      "Ping": 22,
      "SessionSeconds": 450,
      "SessionTime": "07:30"
    }
  ]
}

πŸ‘¨β€πŸ’» Author

Created by PoncikMarket. Version: 1.5.1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages