Skip to main content

Download

https://www.leaderos.net/plugin/csgo

Source Code

https://github.com/leaderos-net/csgo-leaderos-connect

Requirements

This plugin requires SourceMod and the ripext extension to be installed.

Installation

1. Download the plugin

Download the latest release as a ZIP file from the link below and extract it: https://www.leaderos.net/plugin/csgo

2. Upload the plugin

Copy the files from the extracted ZIP into your server’s SourceMod directory:
csgo/addons/sourcemod/plugins/leaderos_connect.smx
csgo/addons/sourcemod/configs/leaderos_connect.cfg
Also upload the ripext extension files:
csgo/addons/sourcemod/extensions/ripext.ext.so      (Linux)
csgo/addons/sourcemod/extensions/ripext.ext.dll     (Windows)
csgo/addons/sourcemod/extensions/ripext.autoload

3. Configure the plugin

Open the config file and fill in your credentials:
csgo/addons/sourcemod/configs/leaderos_connect.cfg
"LeaderosConnect"
{
    "WebsiteUrl"            "https://yourwebsite.com"
    "ApiKey"                "YOUR_API_KEY_HERE"
    "ServerToken"           "YOUR_SERVER_TOKEN_HERE"
    "FreqSeconds"           "300"
    "CheckPlayerOnline"     "1"
    "DebugMode"             "0"
}
If the config file does not exist, the plugin will auto-generate it with default values on first run.

4. Required server configuration

Add this to your csgo/cfg/server.cfg:
sv_hibernate_when_empty 0
Without this, the server enters sleep mode when no players are connected and stops processing game ticks. This prevents commands from executing on an empty server.

5. Restart your server

Restart your server. The plugin is now active. Run leaderos_status in the server console to confirm everything is working.

Configuration

OptionDescription
WebsiteUrlThe URL of your LeaderOS website (e.g., https://yourwebsite.com). Must start with https://.
ApiKeyYour LeaderOS API key. Find it on Dashboard > Settings > API.
ServerTokenYour server token. Find it on Dashboard > Store > Servers > Your Server > Server Token.
FreqSecondsHow often the plugin polls the command queue, in seconds. Default: 300 (5 minutes).
CheckPlayerOnlineSet to 1 to queue commands for offline players and deliver them on next login. Set to 0 to execute commands regardless of whether the target player is online.
DebugModeSet to 1 to enable verbose debug logging, or 0 to disable it.

Console Commands

All commands can be run freely from the server console or via RCON.
CommandDescription
leaderos_statusDisplays the current plugin state, URL, token, poll frequency, and timer status.
leaderos_pollTriggers an immediate queue poll without waiting for the next interval.
leaderos_reloadReloads the config file and restarts the poll timer.
leaderos_debugToggles debug mode on or off at runtime and saves the change to the config file.