Garry's Mod
The FluteGModConnect addon: install, link to the site, groups, DarkRP and Pointshop money, bans, reports and the in-game menu.
Your Garry's Mod server is integrated with the site through the GameLink addon, which keeps the server and the site in sync. The site gives groups, money and Pointshop items, bans players and sees who is online.
| Platform | Archive | Setup command | Site module |
|---|---|---|---|
| Garry's Mod addon | flute-gmod-addon-<VERSION>.zip | flute_setup "<site url>" <token> | GmodKit |
Releases are on GitHub. The server page in the admin also offers the latest build with a "Download" button.
What you get
Every few seconds the addon tells the site who is online and in which group, plus the map, gamemode and tickrate. The site answers with commands: give a group, add money, ban, message a player. Each command runs once, even across a map change or a restart.
| In the game | What the site needs |
|---|---|
| linking Steam to an account, sign-in link, balance, menu, online players | the engine alone |
| bans, chat and voice blocks | the Sentinel module |
| player statistics | the Stats module |
!report reports | the Reports module |
| groups and privileges | the GiveCore module |
| online players on the monitoring page | the Monitoring module |
| Pointshop and Pointshop 2 items in the shop and rewards | the GmodKit module and a module built on Rewards (Shop, cases, rewards) |
Requirements
A Garry's Mod server with HTTP on (no -disablehttp launch option). The addon is plain GLua, with no binary modules and no open ports. The x86-64 branch has been tried. The addon finds ULX/ULib or FAdmin for groups, and DarkRP, Pointshop and Pointshop 2 for money and items, on its own. None of them is required.
Install
Unpack the archive into addons
Download flute-gmod-addon-<VERSION>.zip and unpack it into garrysmod/addons/. You should end up with:
garrysmod/
└── addons/
└── flute_connect/
├── addon.json
└── lua/
├── autorun/flute_connect.lua
└── flute/Restart the server
On the first start the addon writes garrysmod/data/flute/config.json with defaults and prints not configured: run flute_setup <url> <token> in the server console.
Link to the site
Issue a token
Open AdminServers, then your server and its "Plugins" tab. Click "Issue token" and copy the command from the window. The step is covered in detail in connecting a server.
Run the command in the server console
flute_setup "https://<YOUR_DOMAIN>" <SERVER_TOKEN>Keep the address in quotes: without them the srcds console reads // as the start of a comment and cuts the line. The command works only in the server console or over RCON. A superadmin in the game gets flute_setup runs only in the server console or over RCON.
Check the link
The addon answers Saved. Connecting to …, and a couple of seconds later Connected to https://<YOUR_DOMAIN> (server #N). On the "Plugins" tab the status turns to "Connected". The "What the plugin reports" block shows the FluteGModConnect version, the players and the actions the addon can run on this server.
flute_status shows the site address, the last sync, the last error and the queue at any time.
The token is saved to config.json and never printed. The console log does keep the command you typed, though. If other people read that log, put url and token straight into config.json and run flute_reload.
Account linking
The site knows a player by their SteamID64. The addon reports a player only after Steam has confirmed the account, and never reports bots. When the game comes through Steam Family Sharing, the addon also sends the owner's SteamID.
The player gets a code on the site in "Profile → Settings → Linked accounts", with the "Get code" button. In game chat they type !link CODE and confirm the link on the site. After that !balance (site balance) and !login (a one-time sign-in link) work. The sign-in link is given only when "Allow signing in from the game" is on in the server's link settings.
What each feature does
Statistics
Needs the Stats module. The addon sends joins, quits and deaths with the weapon and hit group, and once a minute a player.stats event with counters: shots, hits on players, damage, NPCs killed, everything spawned from the spawn menu (built), suicides. TTT, TTT2 and team gamemodes also get team kills, and the first kill of a TTT round is tagged first_blood. While the site is down the counters wait in memory and leave in one event. Switch off with report_deaths, report_rounds, report_stats in the config.
Bans and mutes
Needs the Sentinel module. A ban from the site goes to ULX when ULib is installed. Without ULib the addon keeps its own ban list and refuses the player on join. Chat and voice blocks are kept by the addon itself, with a duration, and survive reconnects and map changes. Bans and unbans made on the server through ULX or FAdmin are sent to the site.
Groups and privileges
Needs the GiveCore module. Groups go through ULX/ULib, FAdmin or the engine's own groups. ULX gives a player one group, so the addon is careful:
- it gives only groups in
managed_groups(vipby default); - it replaces only groups in
replaceable_groups(userby default). An admin keeps their rank, and the delivery shows "The player holds a group of their own on the server, the plugin does not replace it"; - removing a group puts back the one it replaced;
- a group with an end date is removed on time, even while the site is down.
The site cannot give admin groups (superadmin, admin and groups inheriting them) until allow_admin_groups is on. With ULib groups reach offline players too; without it the player must be on the server.
Money and items
Money goes to DarkRP, Pointshop or Pointshop 2 (standard or premium points), in whole amounts and only to a player in game. On the site this is the "Server credits" reward, and its "Plugin currency" field picks the economy: darkrp, pointshop, ps2 or ps2_premium. An empty field takes currency from the config, and if that is empty too, the first economy found. When the DarkRP database is connected on the server's "Plugins" tab, money goes through it, and the field must be empty or wallet: darkrp or any other value makes the delivery fail. While the player is on the server DarkRP holds the wallet itself, so the site does not write to the database. The delivery waits with "The player is on the server. The site will try again once they leave" and goes through on its own once they leave. Waiting spends no attempts.
Pointshop items come from the GmodKit module. An item the player already owns is not given twice. With a full Pointshop 2 inventory the delivery waits and the player sees "Your Pointshop inventory is full. Free a slot to get …".
Reports
Needs the Reports module. !report or !report name opens a window where the player picks whom to report and why. The site gets the map, the target's kills and deaths and up to 10 of their chat lines from the last 5 minutes. One report on the same player per 5 minutes, at most three per 10 minutes.
In-game menu
!flute opens the site menu in a Derma window, !settings opens its settings page directly. The menu is built on the site in AdminServersIn-game menu (In-game menu): pages, images, descriptions, buttons with prices, switches. The window has no QR codes and no text input; links open through the game's browser or are copied.
Monitoring
Online players, map, gamemode and tickrate come with every sync. The site shows them in the admin, and the Monitoring module on the public servers page. So that an empty server does not fall asleep and drop off the site, the addon sets sv_hibernate_think 1 on start. Turn that off with hibernate_think: false.
Commands and permissions
| Command | Who | What it does |
|---|---|---|
flute_setup "<url>" <token> | server console, RCON | saves the address and token and connects |
flute_status | console, superadmin in game | link state, queue, supported actions |
flute_sync | console, superadmin in game | syncs now |
flute_reload | console, superadmin in game | rereads config.json |
!link CODE | player | links Steam to the site account |
!login | player | one-time sign-in link to the site |
!balance | player | site balance |
!flute, !settings | player | site menu and its settings |
!report [name] | player | reports a player |
Chat commands also work with /. The player console has flute_menu and report. If another addon already owns a command name, rename it in commands (!menu, for one, belongs to ULX).
Config
garrysmod/data/flute/config.json is written on the first start. Run flute_reload after editing it.
{
"url": "https://<YOUR_DOMAIN>",
"token": "<SERVER_TOKEN>",
"managed_groups": ["vip"],
"replaceable_groups": ["user"],
"currency": "",
"allow_raw": false
}| Key | Default | What it changes |
|---|---|---|
url, token | "" | site address without a trailing /, and the server token |
allow_insecure_http | false | allow an http:// address, only for a site on the same machine |
allow_raw | false | let the site run console commands. Without it only typed actions work |
blocked_commands | [] | commands the site may never run, on top of the built-in list (quit, exec, alias, rcon_password, lua_run, ulx luarun and more) |
http_timeout | 15 | seconds to wait for the site |
managed_groups | ["vip"] | groups the site may give, lowest first |
replaceable_groups | ["user"] | groups a given group may replace |
allow_admin_groups | false | let the site give admin groups |
currency | "" | economy used when the site names none: darkrp, pointshop, ps2, ps2_premium |
commands | link, login, balance, menu: flute, settings, report | chat command names |
report_deaths, report_rounds, report_stats | true | send deaths, TTT round ends, player.stats counters |
reports | true | the !report command |
report_reasons | wallhack, aimbot, abuse, grief, other | report reasons; the codes go to the site |
report_same_target_seconds | 300 | pause between reports on the same player |
report_max, report_window_seconds | 3, 600 | reports one player may send per window, in seconds |
menu | true | offer the in-game menu to the site |
hibernate_think | true | set sv_hibernate_think 1 on start |
language | "en" | messages when the player's language is unknown: en, ru, uk |
chat_prefix | "[Flute] " | prefix of chat lines |
debug | false | log every request and command to the console |
Players get messages in their game language (gmod_language): English, Russian or Ukrainian.
Troubleshooting
For any other message, use the error lookup.
the site did not accept the key: copy the token again from Admin → Servers → server → GameLink and run flute_setup
The token was reset or revoked. Issue a new one on the server's "Plugins" tab and run flute_setup again.
the site refused the signature: check the server clock (±60 s)
The game server's clock is more than a minute off the site's. Turn on time sync (NTP) on the server machine.
| Console message | What to do |
|---|---|
Usage: flute_setup "https://your-site.example" flute_srv_… | the address was cut at //. Put it in quotes |
The token must start with flute_srv_ | copy the token again from the window on the "Plugins" tab |
http:// is refused | use an https:// address. For a site on the same machine turn on allow_insecure_http |
the site did not sign its answer or the answer's signature is wrong | something other than the site answered (a proxy on the way), or the token differs. The addon ran nothing from that answer |
network error: HTTP is disabled (-disablehttp) | remove -disablehttp from the server's launch options |
group.add refused: … is an admin group | the site tried to give an admin group. Allow allow_admin_groups or give another group |
data/flute/config.json is not valid JSON | the file has an error and the addon runs on defaults. Fix the JSON and run flute_reload |
If a purchase did not reach the player, open AdminServersSent to servers (Sent to servers): it shows the reason, such as "The player is not on the server" or "The server plugin cannot do this. Update the plugin".
| Action | On the server |
|---|---|
raw | a console command, only with allow_raw. Lines with ; or a line break are refused |
player.kick | kick with the reason |
message.player, message.broadcast | chat message |
message.title | large text in the middle of the screen |
notify.player | a notification with a sound, and the same text in chat |
group.add, group.remove | group through ULX/ULib, FAdmin or the engine |
ban.apply, ban.lift | ULX ban or the addon's own ban list |
comms.gag, comms.mute, comms.unblock | chat and voice block with a duration |
economy.deposit, economy.withdraw | DarkRP money or Pointshop, Pointshop 2 points |
gmod.ps.item.give, gmod.ps2.item.give | a Pointshop or Pointshop 2 item |
menu.refresh | drops the cached menu |
Economy and Pointshop actions are reported to the site only while that addon is loaded. Anything else is answered unsupported_action.
Site modules can read these plugins' databases directly. Connect the database on the server's "Plugins" tab: Sentinel reads bans from xAdmin and SourceBans, GiveCore gives groups in xAdmin, DarkRP money and ULX groups by command.
SAM, sAdmin, ServerGuard and xAdmin are not supported for groups: with them the group is set through the engine and the admin mod may overwrite it. Bans from the site on a FAdmin server go to the addon's own list. ULX mutes (ulx mute, ulx gag) are not sent to the site. Money does not reach an offline player; the delivery waits until they join.
The token never travels over the network. Each request carries an X-Flute-Key header with the key id, a fresh nonce and a signature, and the site signs its answer. The addon runs nothing from an answer without a valid signature: it treats it as a network failure and tries again later. Lua code from the site is never run.