ReferenceJuly 2, 2026Updated October 31, 20266 min read

sv_loadingurl: Complete Guide to GMod Loading Screen URLs

How sv_loadingurl works: syntax, the %s and %m variables, which URLs GMod accepts, the JavaScript functions it calls, and why a screen fails to show.

By Lumescreen Team

sv_loadingurl is the server setting that tells Garry's Mod which web page to show players while they join. This reference was checked in October 2026 against GMod's own loading screen code (lua/menu/loading.lua) and the official wiki page.

If you only need a working screen, the step-by-step installation guide is shorter. Or generate a hosted screen and come back here when you want the details.

What sv_loadingurl does

When a player connects, the client receives the URL set in sv_loadingurl, replaces its placeholders and opens the page full screen in GMod's embedded Chromium browser (CEF 86 on Windows, according to the GMod wiki). The page stays up while maps, models, materials and Workshop content download, and GMod removes it when loading ends.

GMod only opens your page when these conditions are met:

  • The server has more than one player slot. The code checks maxplayers > 1, so a single-player game never shows a custom loading screen.
  • The URL starts with http (http:// or https://) or with asset://.
  • The player has not turned off custom loading screens. The client setting cl_enable_loadingurl, a checkbox in GMod's multiplayer options since October 2019, must be on.

Syntax: where to set it

The usual place is the server configuration file:

garrysmod/cfg/server.cfg
sv_loadingurl "https://example.com/loading"

You can also pass it as a launch parameter, with a plus sign:

Launch parameters
+sv_loadingurl "https://example.com/loading"
  • server.cfg: the usual choice, editable from any hosting panel's file manager. Path: garrysmod/cfg/server.cfg.
  • gmodserver.cfg on LinuxGSM: LinuxGSM installs keep sv_loadingurl in this file by default (LinuxGSM documentation).
  • autoexec.cfg or the launch line: both are documented on the GMod wiki. The launch line helps when your host locks the config files but lets you edit startup parameters.

URL variables: %s and %m

Before opening the page, GMod replaces two placeholders in the URL:

  • %s: the joining player's 64-bit SteamID, for example 76561198012345678. The page can use it to show the player's name or avatar.
  • %m: the current map, for example rp_downtown_v4c_v2.
Example with variables
sv_loadingurl "https://example.com/loading?steamid=%s&mapname=%m"

Lumescreen URLs use both variables and resolve %s to the player's Steam name and avatar, with no Steam API key on your side.

The JavaScript functions GMod calls

GMod's menu code calls the following global functions on your page, and only if they exist: it checks for each one on window before calling it.

  • GameDetails(servername, serverurl, mapname, maxplayers, steamid, gamemode, volume, language): called once, after your page has finished loading. volume is the player's music volume setting (snd_musicvolume, from 0 to 1) and language their GMod menu language (gmod_language). Current versions also pass the gamemode's display name as a ninth argument.
  • SetFilesNeeded(needed) and SetFilesTotal(total): called together, in that order, when the list of files the server offers for download changes and at least one of them is missing on the client. They are not called again after each finished file, and never with 0.
  • DownloadingFile(fileName): called when a download starts. Server files arrive as paths such as materials/models/car.vmt, Workshop items arrive by name.
  • SetStatusChanged(status): the other status lines, for example 'Starting Lua...'. The wiki notes that statuses from before the downloads, such as 'Retrieving server info', usually never reach the page.
Minimal example: show the current file and status
var started = 0;

window.DownloadingFile = function (fileName) {
  started++;
  document.getElementById("file").textContent = fileName;
  document.getElementById("count").textContent = started + " files";
};

window.SetStatusChanged = function (status) {
  document.getElementById("status").textContent = status;
};

A percentage bar needs more care, because Workshop items are not counted in SetFilesNeeded. The progress bar guide covers it. Every Lumescreen theme already listens to these calls.

Accepted URL types

  • https:// (or http://): the normal case. You can update the page without touching the server, and every player gets the current version.
  • asset://: loads a file from the player's own game files, for example asset://garrysmod/html/loading.html, GMod's default page. Your players don't have your custom file, so this is only useful for local tests. GMod re-enabled asset:// for loading screens in March 2024.
  • data: URLs: no longer work. Since April 2021, GMod only opens URLs that start with http (commit 8359089), and asset:// was added back in March 2024. Older guides that suggest a data: URL for a single image are out of date.

Constraints of GMod's embedded browser

  • No clicks. GMod turns off mouse input on the loading panel, so links, buttons and click-to-play never work in game. Show URLs as plain text.
  • Chromium 86 on Windows. Newer CSS is ignored: inset needs Chrome 87, aspect-ratio and :is() need Chrome 88, :has() and container queries need Chrome 105 (MDN compatibility data). Some Linux players still run the older Awesomium engine, based on Chromium 17, according to the GMod wiki.
  • Video. MP4 (H.264) files and YouTube embeds don't play: both are known issues on the GMod tracker (#3148 and #5644). Use images or CSS animation, and test any other video format in game before relying on it.
  • Audio autoplay. Background audio can start without a click in game. A desktop browser blocks it until you click, so a preview can stay silent while the game plays the track.
  • Native download box. GMod draws its own download panel in the bottom-right corner (about 300 × 40 px). Keep that corner free of important content.
  • Any resolution. The page fills the player's screen, from 1280 × 720 to ultrawide.

Troubleshooting sv_loadingurl

  • Default screen still shows. Check the player setting cl_enable_loadingurl (test from a second account), a server with more than one slot, a URL that starts with https://, the quotes, and the file the server executes (server.cfg, or gmodserver.cfg on LinuxGSM). Typing sv_loadingurl in the server console prints the value in use.
  • Blank or black page. Open the URL in a desktop browser and watch the console for errors. Then look for CSS or JavaScript newer than Chromium 86, and for MP4 or YouTube media.
  • Mixed content. Serve images and audio over https when the page itself uses https.
  • Old version still showing. If you host the page yourself, send Cache-Control: no-store. Lumescreen pages already do.
  • Page shows but no progress. The functions are missing from window, a JavaScript error stopped the script, or the downloads come from the Workshop, which only triggers DownloadingFile.

For a checklist in order, see Custom GMod loading screen not showing? 10 checks.

The fast path

If you'd rather not build and host the page yourself, Lumescreen gives you a hosted URL with themes, live server data and music. It's free to start, and the installation is the one line above.

Read next