Set up a GMod loading screen with sv_loadingurl
The loading screen players see while connecting is a web page. You choose which one with a single line in server.cfg.
In short
Add sv_loadingurl "https://…" to garrysmod/cfg/server.cfg and restart the server. If you append %s and %m to the address, Garry's Mod fills in the player's SteamID and the map name.
The line for server.cfg
sv_loadingurl is a server setting. It holds the address of the page Garry's Mod shows while connecting. The quotation marks are required, otherwise the address is cut off at special characters like &.
sv_loadingurl "https://tools.nexthosting.app/loadingscreen.php?s=DEINCODE&steamid=%s&mapname=%m"What %s and %m mean
When a player connects, Garry's Mod replaces two placeholders in the address: %s with the player's SteamID64 and %m with the map name. Leave both exactly as they are. Without %s, the loading screen can't greet the player by name.
Step by step
- Open the file:
garrysmod/cfg/server.cfgin your server's file manager. If it doesn't exist yet, create it. - Add the line: If there is already an
sv_loadingurlline, replace it. Otherwise add the new one at the end and save. - Restart the server: server.cfg is read at startup. If you enter the command in the server console instead, it applies immediately to new connections, but only until the next restart.
- Test it: Connect yourself. Players who are already on the server only see the loading screen the next time they connect.
Check that the setting is active
Enter just sv_loadingurl in the server console. The server replies with the value currently in effect. If it shows an address other than yours, another file or an addon is overriding the setting.
Frequently asked questions
Do I need web hosting for this?
Only if you build the page yourself. With the generator, the page is hosted by us and you just enter the finished line.
Does this also work on servers rented from other providers?
Yes. You only need access to server.cfg, for example through a file manager or FTP.
Can I change the loading screen without touching server.cfg?
With the generator, yes. The address stays the same, and players see changes made in the editor the next time they connect.
A finished loading screen without writing HTML
The generator builds the page and the line for your server.cfg, and takes care of progress, music and the Steam name. You pick a design and enter your texts.
Free. Sign in with your Nexthosting account; creating one costs nothing.