Skip to Content
Game plugins

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.

PlatformArchiveSetup commandSite module
Garry's Mod addonflute-gmod-addon-<VERSION>.zipflute_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 gameWhat the site needs
linking Steam to an account, sign-in link, balance, menu, online playersthe engine alone
bans, chat and voice blocksthe Sentinel module
player statisticsthe Stats module
!report reportsthe Reports module
groups and privilegesthe GiveCore module
online players on the monitoring pagethe Monitoring module
Pointshop and Pointshop 2 items in the shop and rewardsthe 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.

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.

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 (vip by default);
  • it replaces only groups in replaceable_groups (user by 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

CommandWhoWhat it does
flute_setup "<url>" <token>server console, RCONsaves the address and token and connects
flute_statusconsole, superadmin in gamelink state, queue, supported actions
flute_syncconsole, superadmin in gamesyncs now
flute_reloadconsole, superadmin in gamerereads config.json
!link CODEplayerlinks Steam to the site account
!loginplayerone-time sign-in link to the site
!balanceplayersite balance
!flute, !settingsplayersite menu and its settings
!report [name]playerreports 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.

garrysmod/data/flute/config.json
{
  "url": "https://<YOUR_DOMAIN>",
  "token": "<SERVER_TOKEN>",
  "managed_groups": ["vip"],
  "replaceable_groups": ["user"],
  "currency": "",
  "allow_raw": false
}
KeyDefaultWhat it changes
url, token""site address without a trailing /, and the server token
allow_insecure_httpfalseallow an http:// address, only for a site on the same machine
allow_rawfalselet 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_timeout15seconds 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_groupsfalselet the site give admin groups
currency""economy used when the site names none: darkrp, pointshop, ps2, ps2_premium
commandslink, login, balance, menu: flute, settings, reportchat command names
report_deaths, report_rounds, report_statstruesend deaths, TTT round ends, player.stats counters
reportstruethe !report command
report_reasonswallhack, aimbot, abuse, grief, otherreport reasons; the codes go to the site
report_same_target_seconds300pause between reports on the same player
report_max, report_window_seconds3, 600reports one player may send per window, in seconds
menutrueoffer the in-game menu to the site
hibernate_thinktrueset 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
debugfalselog 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 messageWhat 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 refuseduse 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 wrongsomething 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 groupthe site tried to give an admin group. Allow allow_admin_groups or give another group
data/flute/config.json is not valid JSONthe 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".

More

On this page