Skip to Content
Game guides

A Garry's Mod site from scratch

From an installed Flute to a Garry's Mod site with live status, statistics, ULX bans from the site and a shop of groups, DarkRP money and Pointshop items.

By the end you will have a Garry's Mod site that shows who is online and the top players, sends bans from the site to the server, and sells VIP for 30 days, DarkRP money and a Pointshop hat. The path below uses DarkRP with ULX and Pointshop. What the addon does with FAdmin, Pointshop 2 and without ULib is on the Garry's Mod page.

What you need

  • An installed Flute and a session as the owner, see installation.
  • A connected Flute key: without it the marketplace installs no modules, see Flute key.
  • A Garry's Mod server with HTTP on: its launch options must not have -disablehttp. The server runs ULX/ULib, DarkRP and Pointshop, and you have access to its files and console.
  • A Steam Web API key: players sign in through Steam with it, and the site reads their nicknames and avatars.

If you picked Garry's Mod in the installer, the site already has a bright theme with a blue accent and big rounded corners, and draft pages "Home", "Rules", "Servers" and "Contacts". No modules were installed at that point, so these pages have no module blocks. Blocks the template places, such as the Monitoring server list, land on these pages by themselves once you install the module, as long as you have not saved the pages. The rest is added in The home page in Studio.

The server and the addon

Without the FluteGModConnect addon the site sees only the player count and the map: groups, money, items, bans and statistics do not work. The addon is plain GLua and calls the site over HTTPS, with no binary modules and no open ports.

Add the server

Open AdminServers and click "Add server". At the "Game" step pick "Garry's Mod" and put the IP and port into "Server address", for example 203.0.113.10:27015. Click "Check connection", then "Save server". Details are in Connect a game server.

Install the addon

Open the server, go to the "Plugins" tab, expand "How to install GameLink" and download flute-gmod-addon-<VERSION>.zip. Unpack it into garrysmod/addons/ so that you get garrysmod/addons/flute_connect/, and restart the server. The console prints not configured: run flute_setup <url> <token> in the server console.

The Plugins tab with the How to install GameLink instructions

Connect the server to the site

Click "Issue token" and run the command from the window in the server console or over RCON. Keep the address in quotes.

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

The addon answers Saved. Connecting to … and a couple of seconds later Connected to https://<YOUR_DOMAIN> (server #N).

Wait for "Connected"

The status on the "Plugins" tab turns to "Connected". At the same moment the "Community setup" list ticks "Link the server to the site" and the GmodKit item "Connect your Garry's Mod server to the site": both wait for the plugin to reach the site.

Purchases and punishments from the site find the player by SteamID64. On the site open Profile → Settings → Linked accounts and click "Get code". Join the server, type !link CODE in chat and confirm the link on the site. Your players go the same way.

flute_setup answers Usage: the address was cut at //

The srcds console treats // as the start of a comment and drops everything after https:. Put the address in quotes, as in the command above. If the console goes to a log other people can read, write url and token straight into garrysmod/data/flute/config.json and run flute_reload.

The Steam key goes into AdminSign-in methods: click "Connect" on the Steam card and fill in "Steam Web API key". Where to get the key is in Sign-in methods.

Modules

ModuleWhat it adds to a Garry's Mod site
GmodKitthe "Pointshop item" and "Pointshop 2 item" rewards for the shop and cases
Monitoringa servers page with the player count, map and gamemode, and the "Servers" block for the home page
Statsthe /stats leaderboard and statistics in the profile
Sentinelbans and chat and voice blocks from the site to the server, the public /bans list
Rewardsdelivery of rewards to the server and the grant log. Stats, GiveCore, Shop and the GmodKit rewards require it
GiveCoreULX groups with a term
Shopproducts sold for the site balance
Reports!report from the game with the offender's kills and chat

Install them from AdminExtensionsModules with "Install"; the admin panel offers the dependencies itself. Dependencies and ionCube are covered in Installing modules. GmodKit has no screen or settings of its own: once installed, it only adds the reward types and an item in "Community setup".

Statistics

Once the server is "Connected", the addon sends joins, quits and deaths with the weapon and hit group, and once a minute counters: shots, hits on players, damage, NPCs killed and everything spawned from the spawn menu. In TTT, TTT2 and team gamemodes it also counts team kills. The addon never sends bots to the site.

The points formula is in AdminStatistics seasonsSettings, the "Points and anti-boosting" group: 2 points for a kill and −1 for a death. Kills count while at least 4 players are on the server, and a player enters the board after 10 kills, so on an empty sandbox the board stays empty.

Punishments

Add a reason

Open AdminPunishmentsPunishment reasons and click "Add reason". Set "Punishment type" to "Ban", type RDM into "Reason" and 1 day into "Default term".

Ban a player from the site

Open the player in AdminPlayers, go to the "Punishments" tab and click "Punish". Set the type to "Ban", tick your server under servers and pick RDM as the reason. The "What will happen" block shows where the command goes. Click the button at the bottom of the form.

The Punish window with the What will happen block

Check the delivery

On the punishment page, the "On servers" block shows "Delivered". With ULib the ban goes to ULX; without it the addon keeps its own ban list and turns the player away on join. The addon holds chat and voice blocks itself, and they survive a rejoin and a map change.

The addon reports bans and unbans made on the server through ULX or FAdmin to the site. ULX mutes (ulx mute, ulx gag) do not reach the site. If bans already live in an xAdmin or SourceBans database, Sentinel can read it directly, see Sentinel.

Shop

Products are sold for the site balance, so connect a payment system first, as described in Accept payments. Below are three products: VIP for 30 days as the vip group in ULX, 50,000 DarkRP money and a Pointshop hat.

Create the VIP privilege

Open AdminPrivileges and click "Create a privilege". Enter VIP as the "Name" and type vip into the "What the player gets" column of the server row. Click "Create a privilege" under the form, then "Sell in the shop" on its page. In the product that opens, fill in "Name", put a "Price" into the 30-day row of "Terms and prices", turn on "On sale" and save.

A privilege with its scheme of servers and groups

The vip group must exist in ULX and be listed in managed_groups in the addon config, where it is by default. The addon replaces only the user group and gives it back on removal, and it removes a group with a term on time by itself, even while the site is down.

Create the DarkRP money product

Open AdminShopProducts and click "New product". In "What the buyer gets" pick the "Server credits" type and set "Quantity" to 50000. Leave "Plugin currency" empty: the addon pays into the first economy it finds, and DarkRP comes first. For Pointshop points, type pointshop. In "Terms and prices" choose "Permanent", fill in "Price", turn on "On sale" and save.

Create the Pointshop item product

Create one more product and pick the "Pointshop item" type. Put the item ID into "Item", which is its file name without .lua: for tophat.lua that is tophat. Set the reward's name and picture yourself, otherwise it is named after the ID.

The Pointshop item reward with the Item field

Give the products to a test player

In AdminPlayers open a test account that is linked with !link and in the user group on the server, choose the "Give a product" action, then "Product and term" and "Server". Your own account will not do for VIP if you are superadmin on the server: an admin never loses their own group, and the grant fails.

Money and items reach only a player who is on the server; otherwise the grant waits for them to join. An item the player already owns is not given twice. Grants that did not get through are collected in AdminRewardsGrants, and the reason for each command is in AdminServersSent to servers.

DarkRP money can also go to an offline player: connect the DarkRP database on the server's "Plugins" tab with "Connect a plugin", as described in server plugins. GiveCore then writes all "Server credits" for this server straight into the database, and only while the player is off the server: while they play, the site does not touch the database. The addon is still needed, because through it the site knows where the player is. Only DarkRP money goes through the database, so "Plugin currency" must stay empty, and Pointshop points are not paid on such a server. The player must have joined the DarkRP server at least once.

The home page in Studio

The Garry's Mod template puts the Monitoring server list on "Home" and "Servers". When Monitoring is installed after the site, the list is already on these pages unless you have saved them. Rebuild the pages from the template only if you have edited them, and add the other module blocks yourself.

Open the template

Open Studio from AdminSite design, click "New page", choose "From a template" and then Garry's Mod.

Tick the pages

Under "What will be created", tick "Home" and "Servers". Pages that already exist are marked "replaces the draft of …". If Monitoring is not installed, the page shows "Without blocks this site lacks: …".

New page → From a template: template list, ticked pages and a preview

Add module blocks and publish

Find "Best players", "Latest punishments" and "Shop: products" in the block list and put them on the home page. Adding and setting up a block is covered in Studio blocks. Then click "Publish", as described in Studio.

A template applied from Studio changes the theme only when you tick "Use the template's theme": colours, fonts and corners replace the theme draft and go live when you publish. The box shows for those allowed to change the theme. Without it, if you picked another game in the installer, colours and fonts are set in the site style, and another theme is turned on in AdminExtensionsThemes.

Check

By now the "Community setup" list on the admin home page ticks "Add a game server", "Link the server to the site", "Connect your Garry's Mod server to the site", "Turn on a login provider", "Connect payments" and "Style the site in Studio", see first steps. The rest is checked in the game and on the site.

  • flute_status in the server console shows no last error.
  • !flute for the test player opens the site menu, and "My privileges" shows VIP and its term.
  • On the server's "Privileges" tab, the "Check" column for VIP says "The server has it".
  • The test player has the vip group, 50,000 more in the DarkRP wallet and the hat in Pointshop.
  • The home page shows the server with its player count, and /bans shows the test ban.
  • AdminRewardsGrants has nothing under "Did not reach the players".

If something does not add up, start with the troubleshooting table on the Garry's Mod page.

More

On this page