Skip to Content
Game plugins

Counter-Strike 1.6

The GameLink plugin for CS 1.6 on AMX Mod X: install, link to the site, non-Steam players, commands, config and demo recording through HLTV.

Your CS 1.6 server is integrated with the site through the GameLink plugin for AMX Mod X, 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. The plugin also handles non-Steam players on ReUnion.

What you installArchiveSetup command
GameLink for AMX Mod Xflute-cs16-amxx-1.0.0.zipflute_setup
HLTV demo recorderflute-cs16-demos-amxx-1.0.0.zipnone, the address and token go into a cfg

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

Requirements

You need HLDS or ReHLDS and AMX Mod X 1.9 or 1.10. The plugin calls the site over HTTPS on its own, so no ports need to be opened. For that it needs the AmxxEasyHttp module (easy_http) 1.4.0 or newer; demo recording needs 1.5.0 or newer. The standard engine, fakemeta and cstrike modules are always required, and hamsandwich is needed to count shots, hits and damage.

The archive holds three builds of the plugin, one per way of handling voice. Enable only one of them in plugins.ini:

BuildWhen to use it
flute_cs16_connect.amxxplain engine
flute_cs16_connect_revoice.amxxReHLDS with ReAPI and Revoice
flute_cs16_connect_vtc.amxxVoiceTranscoder

Install the plugin

Unpack the archive

Unpack flute-cs16-amxx-1.0.0.zip into cstrike/.

cstrike/addons/amxmodx/
├── plugins/
│   ├── flute_cs16_connect.amxx            voice builds, enable one
│   ├── flute_cs16_connect_revoice.amxx
│   ├── flute_cs16_connect_vtc.amxx
│   └── flute_cs16_selftest.amxx           self-test, optional
├── configs/plugins/FluteConnect/
│   ├── flute_connect.cfg                  address, token and every setting
│   └── flute_groups.ini                   site roles → AMXX flags
├── data/lang/flute_cs16_connect.txt
└── scripting/include/                     flutecms_cs16_bridge.inc, flutecms_cs16_compat.inc

Enable the plugin and easy_http

Add one line to addons/amxmodx/configs/plugins.ini and make sure easy_http is enabled in modules.ini. Restart the server.

addons/amxmodx/configs/plugins.ini
flute_cs16_connect.amxx

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

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

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

The command works only in the server console or over RCON; an admin cannot run it from the game. It writes the address and token to flute_connect.cfg and syncs right away:

[FluteConnect] saved to configs/plugins/FluteConnect/flute_connect.cfg, connecting...

Without console access, put flute_url "https://<YOUR_DOMAIN>" and flute_token "<SERVER_TOKEN>" into addons/amxmodx/configs/plugins/FluteConnect/flute_connect.cfg and restart the server. The plugin will not read the url = … and token = … lines from "No access to the console" in the token window as they are.

flute_status
FluteCS16Connect 1.0.0
  site: https://<YOUR_DOMAIN>  token: set
  connected: yes  server id: 3  last sync: 4 s ago  next in 6 s
  last error: -  failures in a row: 0
  unsent acks: 0  delayed commands: 0  buffered events: 0
  group mappings: 2  voice backend: engine

connected: yes 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. The game server's clock must stay within 60 seconds of the site's.

Account linking

A player opens "Profile → Settings → Linked accounts" on the site, clicks "Get code" and types /link CODE or !link CODE in the game chat. The code lives for 10 minutes. The link then has to be confirmed on the site.

/balance shows the site balance. /login sends a one-time sign-in link that works for 2 minutes. Links in CS 1.6 chat are not clickable, so the link is also printed to the player's console (~). Signing in from the game works only when "Allow signing in from the game" is on under "Security" on the "Plugins" tab.

Non-Steam players

Under ReUnion and dproto, non-Steam clients also get ids like STEAM_0:1:123 or VALVE_0:1:123, and such an id can be faked. So the plugin sends as Steam only the players Steam has verified, and everyone else as non-Steam players. With ReUnion installed, the plugin asks ReUnion for the type. Without it, flute_trust_steam_ids decides: with 1 any STEAM_ id counts as real Steam, with 0 every id goes out as non-Steam.

"Player authentication" under "Security" sets which players reach the site. "Licensed" (the default) lets through Steam only, "Offline" only non-Steam players, and "With and without Steam" both. For a server with ReUnion, pick "With and without Steam". Non-Steam players can link their account with /link CODE, but cannot sign in from the game or pay with the balance. The exception is "Offline with a password login" mode, for a server that asks for a password itself: there they can do everything, but Steam players are not let through.

The Security section with the Player authentication choice

A non-Steam player's id depends on the ReUnion settings of each server, so one person can have different ids on different servers. STEAM_ID_LAN, STEAM_ID_PENDING, HLTV and bots never reach 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, gags and mutesSentinel
/report player reportsReports
Groups and flagsGiveCore
Store purchasesShop
Delivering rewards to the server: group, currency, commandRewards, required by Shop, GiveCore and Stats
Demo recording and viewingDemos

Purchases and perks

Site roles become AMX Mod X flags through flute_groups.ini. The plugin loads a player's roles on join and only removes flags it granted itself, so admins from users.ini keep theirs.

addons/amxmodx/configs/plugins/FluteConnect/flute_groups.ini
"VIP"    "t"
"Admin"  "bcdefijmnopqrsu"

vip:<name> and admin:<name> groups and the site currency are handed to your own plugins through command templates: flute_group_vip_add_cmd, flute_group_admin_add_cmd, flute_economy_deposit_cmd and their pairs. While a template is empty, the site does not offer that action on this server. The site never grants the l and h flags or the groups root, rcon, owner, superadmin; flute_group_forbidden_flags and flute_group_forbidden_names set that.

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. In GiveCore the delivery method is set in "How the site passes the privilege to the server"; for GameLink it is "Flute plugin".

Bans, gags and mutes

Bans from the site run the command in flute_ban_cmd, by default amx_ban #{userid} {minutes} '{reason}'. An offline player gets flute_ban_offline_cmd, an unban flute_unban_cmd. If your ban system expects the arguments in another order, change the template. Single quotes in a template become double quotes when it runs.

The plugin handles gags and mutes itself: it blocks chat and voice for a set time and keeps the block in addons/amxmodx/data/flute_connect_state.json. Admins issue them with amx_gag, amx_mute, amx_gagmenu or /gag, and players can mute each other personally with /mute.

Gags and mutes issued on the server, and bans from Fresh Bans and Lite Bans, are sent back to the site. Whether the site keeps them is up to the Sentinel setting "Punishments issued on a server". The plugin cannot see bans from AMX Mod X itself, Advanced Bans or AMXBans, and no ban system on CS 1.6 reports unbans to the site.

Stats

The plugin sends joins and leaves, deaths, round ends and map starts, and at the end of each round player.stats: shots, hits, damage, bombs, hostages, teamkills and suicides. The first kill of a round carries the first_blood tag. CS 1.6 has no warmup, so every round counts. Bots are not counted. To turn the counters off: flute_stats 0.

Reports

/report lists the players, then the reasons. /report part_of_name narrows the list. In the console the command is flute_report; plain report there stays the game's radio command. The report sends the map, the match, the round, the suspect's score and up to 10 of their latest messages from the last 5 minutes. 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 as an AMX Mod X menu, seven items per page. 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 GoldSrc server cannot record demos by itself, so the HLTV proxy that ships with HLDS records them, and the plugin drives it over rcon and uploads the file to the site. The Demos module lets players watch the demos on the site. HLTV must run on the same Linux machine and write into this server's cstrike/ folder.

Install the plugin

Unpack flute-cs16-demos-amxx-1.0.0.zip into cstrike/ and add flute_cs16_demos.amxx to plugins.ini. You need easy_http 1.5.0 or newer, sockets and fakemeta.

Start HLTV

Put hltv.cfg next to hltv in the HLDS root and start ./hltv. The HLTV rcon port is 27020 by default.

hltv.cfg
connect 127.0.0.1:27015
adminpassword "<PASSWORD>"
delay 0
autoretry 1

Fill in the config

Here demos_site takes the full upload address, not the site root.

addons/amxmodx/configs/plugins/FluteDemos/flute_demos.cfg
demos_site "https://<YOUR_DOMAIN>/api/v1/demos/upload"
demos_token "<SERVER_TOKEN>"
demos_hltv_address "127.0.0.1:27020"
demos_hltv_password "<PASSWORD>"

Change the map

demos_status

The answer should contain hltv_connected=1. Recording starts with the next round.

Commands and permissions

CommandWhoWhat it does
/link CODEplayerlink the account to the site
/balanceplayersite balance
/loginplayerone-time sign-in link to the site
/menu, /fluteplayersite menu
/settingsplayermenu settings page
/report [name], flute_reportplayerreport a player
/muteplayerpersonally mute another player
/sorryplayerask admins to lift a block
/gag, amx_gag, amx_ungag, amx_mute, amx_unmute, amx_gagmenu, flute_gag, flute_ungagflag dchat and voice blocks
flute_kickflag ckick
flute_setup <address> <token>server console, RCONconnect the server
flute_status, flute_sync, flute_sync_access, flute_playersflag lstatus, sync, online players' roles, the player list as the site gets it
demos_status, demos_record, demos_stoprecordserver console, RCONdemo queue, start and stop recording

Player chat commands also work with !.

Plugin config

Every setting lives in addons/amxmodx/configs/plugins/FluteConnect/flute_connect.cfg. These are the ones changed most often:

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_raw01 runs console commands from the site
flute_eventsplayer.join,player.quit,player.death,round.end,map.startwhich events to send
flute_stats1send player.stats
flute_access_enabled1load site roles on join and grant flags from flute_groups.ini
flute_ban_cmdamx_ban #{userid} {minutes} '{reason}'ban an online player
flute_ban_offline_cmdamx_addban '{steam2}' {minutes} '{reason}'ban an offline player
flute_unban_cmdamx_unban '{steam2}'unban
flute_group_vip_add_cmd, flute_group_vip_remove_cmdemptyyour VIP plugin's commands for vip:<name> groups
flute_economy_deposit_cmd, flute_economy_withdraw_cmdemptyyour store's commands for the site currency
flute_trust_steam_ids1without ReUnion: 1 treats any STEAM_ id as real Steam
flute_report_commandreportchat command name for reports; empty turns reports off
flute_prefix[Flute]chat message prefix
flute_debug0detailed log; the token is never written to it

Troubleshooting

For any other message, use the error lookup.

sync refused: unauthorized — the site does not know this token: reset it in Admin -> Servers -> GameLink and run flute_setup again

The token was reset or revoked. Issue a new one on the "Plugins" tab and run 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.

The server sent players its player check turns away

The client has no Steam, and "Player authentication" is set to "Licensed". Pick "With and without Steam". A client with no id at all (STEAM_ID_LAN, STEAM_ID_PENDING) never reaches the site, whatever the mode.

Message or symptomWhat to do
not configured: run flute_setup <site url> <token> in the server consolerun flute_setup
http:// is refused: use https://, or set flute_allow_http 1 if the site runs on this machineuse an https:// address
sync refused: the answer is not signed by the sitethe answer did not come from the site, for example from a proxy; nothing in it was run
sync failed: network or sync failed: http_502the site is down; the plugin retries with a growing pause up to flute_sync_max
MIGRATION: FluteCMS CS16 Bridge settings foundsettings of the old plugin are left over, see "Moving from FluteCMS CS16 Bridge" below
the menu is emptyno menu is set up for the server in "In-game menu", or the site has not sent it yet; check flute_status
site commands do not runflute_debug 1 shows each command; console commands stay off while flute_allow_raw is 0
[Demos] no HLTV connected to this server — recording skippedHLTV is not connected; check connect and autoretry 1 in hltv.cfg
[Demos] HLTV did not start recordingwrong demos_hltv_password, or HLTV is unreachable at demos_hltv_address
[Demos] the site does not know demos_token (unauthorized)demos_token holds the wrong token
the last seconds of a match are missingset delay 0 in hltv.cfg

Reference

More

On this page