Skip to Content
Game plugins

Source games (SourceMod)

The GameLink plugin for CS:S, TF2, L4D2, CS:GO and other SourceMod games: install, link to the site, commands, config and demo recording.

Your SourceMod server is integrated with the site through the GameLink plugin, which keeps the server and the site in sync. The site receives who is online, the map, reports and stats, and the server picks up purchases and punishments and opens the site menu for players.

What you installArchiveSetup command
GameLink for SourceModflute-source-sourcemod-1.0.0.zipsm_flute_setup
SourceTV demo recorderflute-source-demos-sourcemod-1.0.0.zipnone, the address and token go into a cfg

The archives are in the flute-source releases. The archive name carries the version without a v, and newer releases have a different number.

Requirements

You need SourceMod 1.11 or 1.12 with Metamod:Source for your game, plus the RIPExt 1.3.x extension, which the plugin uses to call the site over HTTPS, so no open ports or RCON are needed. Demo recording also needs the SteamWorks extension.

The plugin recognises CS:GO, CS:S, TF2, Left 4 Dead, Left 4 Dead 2, DoD:S and HL2DM, and it runs on other SourceMod games too. The admin panel offers the build and a ready command with the token for servers set to CS:S, Team Fortress 2 and Left 4 Dead 2.

For CS:GO the admin panel shows the CS2 builds and command

The game list has CS:GO and CS2 as one entry, "CS 2 / CS:GO", so the "Plugins" tab offers CS2 archives, and the token window shows the css_flute_setup, sw_flute_setup and mm_flute_setup commands. For a CS:GO server on SourceMod, download flute-source-sourcemod from the releases and run sm_flute_setup with the same address and token.

Add DoD:S, HL2DM and Left 4 Dead as "Another game". The token window then shows the token without a ready command, so put it into sm_flute_setup yourself.

Install the plugin

Install RIPExt

Unpack the RIPExt archive into the game folder so that rip.ext.so (rip.ext.dll on Windows) ends up in addons/sourcemod/extensions/.

Unpack flute-source-sourcemod-1.0.0.zip into the game folder: cstrike/ for CS:S, tf/ for TF2, left4dead2/ for L4D2, csgo/ for CS:GO. Restart the server.

<game folder>/
├── addons/sourcemod/
│   ├── extensions/rip.ext.so          RIPExt, installed separately
│   ├── plugins/flute_connect.smx
│   ├── configs/flute_connect.cfg      commands, integrations, reports
│   ├── translations/flute_connect.phrases.txt
│   └── scripting/                     sources and include/flute_connect.inc
└── cfg/sourcemod/flute_connect.cfg    site address, token, switches

SourceMod creates cfg/sourcemod/flute_connect.cfg itself the first time the plugin runs. There are two files called flute_connect.cfg and they hold different things: the one in cfg/sourcemod/ has the address, token and switches, the one in addons/sourcemod/configs/ has command names, integrations and reports.

Adding the server to the admin panel and issuing a token are covered in "Connect a game server". In short, for SourceMod:

Issue a token

Open AdminServers, then your server and its "Plugins" tab. Expand "How to install GameLink" and click "Issue token". The window shows a ready command with the token already filled in. It is shown only once.

The Plugins tab with the How to install GameLink section

Run the command in the server console

sm_flute_setup "https://<YOUR_DOMAIN>" <SERVER_TOKEN>

The command works only in the server console or over RCON. Typed in game, it answers sm_flute_setup runs only in the server console, even for an admin. It writes the address and token to cfg/sourcemod/flute_connect.cfg and connects right away:

[Flute] saved to cfg/sourcemod/flute_connect.cfg, connecting to https://<YOUR_DOMAIN>

Without console access, put two lines into cfg/sourcemod/flute_connect.cfg and restart the server. SourceMod will not read the url = … and token = … lines from "No access to the console" in the token window; it needs this form:

cfg/sourcemod/flute_connect.cfg
flute_url "https://<YOUR_DOMAIN>"
flute_token "<SERVER_TOKEN>"
sm_flute_status
[Flute] FluteSourceConnect/1.0.0 | configured=yes server_id=3 last_sync=4s ago next=10s pending=0 acks=0 events=0 last_error=-

configured=yes, a recent last_sync and last_error=- mean the link works. Within a minute the "Plugins" tab in the admin panel shows "Connected". Under "For power users: security, command queue, in-game menu", the "What the plugin reports" block lists the plugin, the game, the players and the actions the server can run.

The token itself never goes over the network. The plugin signs every request with it and checks the signature of every answer, and the site recognises the server by the X-Flute-Key header, which the token cannot be recovered from. The game server's clock must stay within 60 seconds of the site's.

Account linking

Players are known by their SteamID. A player opens "Profile → Settings → Linked accounts" on the site, clicks "Get code" and types !link CODE in the game chat. The code lives for 10 minutes. The link then has to be confirmed on the site; until then the game says "Almost done! Confirm the link on the site".

!balance shows the site balance. !login sends a one-time sign-in link that works for 2 minutes; it is also printed to the console because links in Source chat are not clickable. Signing in from the game works only when "Allow signing in from the game" is on under "Security" on the "Plugins" tab.

Players Steam has not verified yet, and every player on a server with sv_lan 1, are not sent to the site.

What the plugin does and which module it needs

Online count, map, account linking, sign-in from the game, balance and the site menu work with the engine alone. Everything else is picked up by a site module: without it, the server still sends the data, but the site does not show it.

FeatureSite module
Online count, map and players on the servers pageMonitoring
Stats: kills, rounds, player.statsStats
Bans, mutes and gags in both directionsSentinel
!report player reportsReports
Admin groups and VIPGiveCore
Store purchasesShop
Delivering rewards to the server: group, currency, commandRewards, required by Shop, GiveCore and Stats
Demo recording and viewingDemos

Purchases and perks

Purchases reach the server as site commands. When the player is offline, the command waits on the site and is sent again about a second after they join. The same command never runs twice.

A group with the vip: prefix goes to VIP Core (R1KO); the plugin grants other groups as SourceMod admin groups from admin_groups.cfg and restores them every time the player joins. The site currency credits goes to Shop Core (R1KO), exp to Levels Ranks. The plugin only tells the site what it can carry out: without Shop Core, the site will not offer credit grants on this server.

In GiveCore the delivery method is set in "How the site passes the privilege to the server"; for GameLink it is "Flute plugin".

Bans, mutes and gags

Bans from the site run through SourceBans++ or MaterialAdmin, or through SourceMod's built-in bans when neither is loaded. Gags and mutes go through SourceComms++ or MaterialAdmin. With none of them, the plugin blocks chat and voice itself, with a duration, and keeps the block on disk.

Bans, gags and mutes that an admin issues or lifts in game are sent back to the site. Whether the site keeps them is up to the Sentinel setting "Punishments issued on a server". Offline bans and unbans in SourceBans++ are invisible to the plugin, because SourceBans++ does not report them.

Stats

The plugin sends joins and leaves, deaths, round ends and map starts. In CS:GO, CS:S and TF2 a death carries tags such as first_blood, domination, revenge. Once a round it sends player.stats: shots, hits, damage, MVPs, bombs and hostages in CS:GO and CS:S; damage, teamkills and suicides in TF2; damage in L4D2. Warmup and bots are not counted. To turn the counters off: flute_stats 0.

Reports

!report lists the players, then the reasons. !report name jumps straight to the reasons. The report sends the map, the match, the suspect's score and up to 10 of their latest chat messages. One report per player about the same target every 5 minutes, and no more than three reports from one player in 10 minutes. Reports takes them in while "Take reports from the game" is on.

In-game menu

!menu or !flute opens the site menu, !settings its settings page. The menu is drawn with the standard SourceMod menu: seven items per page, six on CS:GO, no pictures. Menu sections are put together in AdminServersIn-game menu (In-game menu). To let players pay from the menu with their site balance, turn on "Allow balance charges" under "Security".

Demo recording

A second plugin records a SourceTV demo for every match, adds round data and uploads it to the site with the same token. The Demos module lets players watch it on the site. The site parses the demo file for CS:GO and CS:S; for other games it uses only the chat from the plugin's data.

Install SteamWorks and the plugin

Put SteamWorks.ext.so into addons/sourcemod/extensions/ and unpack flute-source-demos-sourcemod-1.0.0.zip into the game folder. The archive holds addons/sourcemod/plugins/flute_demos.smx and cfg/sourcemod/flute_demos.cfg.

Set the address and token

The token is the same one GameLink uses.

cfg/sourcemod/flute_demos.cfg
demos_site "https://<YOUR_DOMAIN>"
demos_token "<SERVER_TOKEN>"

Turn on SourceTV

The plugin sets tv_enable 1 itself, but SourceTV only starts when a map loads. Change the map twice, or add tv_enable 1 to server.cfg and change the map once. To check:

demos_status
[Demos] queue=0 running=0 steam_ready=1 voice_capture=1 url=https://<YOUR_DOMAIN>

Recording starts with the next round.

SourceTV records a stream delayed by tv_delay, so the last seconds of a match can be missing from the file. On a recording server, set tv_delay 0.

Commands and permissions

CommandWhoWhat it does
!link CODEplayerlink Steam to a site account
!balanceplayersite balance
!loginplayerone-time sign-in link to the site
!menu, !fluteplayersite menu
!settingsplayermenu settings page
!report [name]playerreport a player
sm_flute_setup <address> <token>server console, RCONsave the address and token and connect
sm_flute_statusflag zconnection, last sync, queues, last error
sm_flute_syncflag zsync now
sm_flute_reloadflag zreread addons/sourcemod/configs/flute_connect.cfg
demos_statusserver console, RCONdemo upload queue

Chat commands also work with /. The names are set in the commands section of addons/sourcemod/configs/flute_connect.cfg and change after a restart.

Plugin config

cfg/sourcemod/flute_connect.cfg
flute_url "https://<YOUR_DOMAIN>"
flute_token "<SERVER_TOKEN>"
flute_allow_raw "0"
flute_stats "1"
SettingDefaultWhat it changes
flute_urlemptysite address without /api; a subfolder works too
flute_tokenemptyserver token flute_srv_…
flute_allow_http01 allows an http:// address, only for a site on the same machine
flute_allow_admin_groups01 lets the site grant admin groups with the z or m flag
flute_allow_raw01 runs console commands from the site; with 0 only standard actions run
flute_http_timeout10request timeout, seconds
flute_eventsplayer.join,player.quit,player.death,round.end,map.startwhich events to send; chat.message can be added
flute_stats1send player.stats
flute_chat_prefix{green}[Flute]{default}chat message prefix
flute_debug0log every request and command

Troubleshooting

For any other message, use the error lookup.

last_error=not configured

The address or token is missing. Run sm_flute_setup in the server console, or put flute_url and flute_token into cfg/sourcemod/flute_connect.cfg.

HTTP 401: the site refused the key id — reset the token in the admin and sm_flute_setup again

The site does not know this token: it was reset or revoked. Issue a new one on the "Plugins" tab and run sm_flute_setup again.

sync refused: invalid_signature — check the server clock (±60 s)

The game server's clock is more than 60 seconds off the site's. Turn on time sync (NTP) on the server machine.

Message or symptomWhat to do
http:// is refused: use https://, or flute_allow_http 1 for a site on this machineuse an https:// address
the answer is not signed by the sitethe answer did not come from the site, for example from a proxy or a hosting error page; nothing in it was run
the plugin does not loadcheck sm exts list: flute_connect.smx does not start without RIPExt
the game says "Your Steam ID is not verified yet"Steam has not authorised the player yet, wait a few seconds; linking does not work on a server with sv_lan 1
a site command is waitingthe player is offline, the command runs when they join; flute_debug 1 shows the line
group.add: admin group '…' does not exist on this serveradd the group to admin_groups.cfg
group.add: admin group '…' has the root or rcon flag — refusedthe group has the z or m flag; set flute_allow_admin_groups 1 if that is intended
command #… refusedthe blocked-command list stopped a console command, see "Blocked commands" below
SourceTV is not active — set tv_enable 1 and change the map; recording skippedchange the map or add tv_enable 1 to server.cfg
http=401: the site refused the key id — check demos_tokenwrong demos_token; the demo stays on disk and uploads after you fix it and change the map
[Demos] discarding … — no players connected during the recordingonly bots were on the server; such recordings are deleted

Reference

More

On this page