The convar sv_loadingurl allows a server owner to define a webpage to show to players when joining the server.
If you are setting the convar through the console then make sure to put quotes around the URL. Also a + should be added to the front. Your command should look something like this:
If you are placing this into your autoexec.cfg configuration file, be sure to remove the +, like so:
If you want, you may also use %s or %m in your URL (most likely in a GET variable) to pass the steam id, and map name respectively. For example:
These can be later retrieved with simple PHP code.
This section will not detail creating your page, and assumes you have already designed one.
%m and %s will be replaced with the server's current map and the player's 64-bit steam community ID, respectively. This means you can grab them using PHP's $_GET superglobal.
The map is a string, so you should have no trouble making use of that. However, the steam community ID is not the classic "shorthand" steam ID often seen in-game. A method of conversion (using PHP's bcmath & bcsub) is shown below.
<!-- Method from http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexb59e.html -- please notify if this doesn't work -->
If you would like to use a local file as a loading screen, for example during gamemode creation as a default loading screen, you can use the asset:// prefix. The example uses the default loading screen, but any html file can be used.
If you would like to use a simple image as a loading screen, but don't have a webhost, you can use the following code as your
sv_loadingurl value. Make sure to replace
URL-GOES-HERE with the link to the image you would like to use. This makes use of Data URIs for writing HTML for the URL.
A free, online and easy-to-use loading screen maker, without having to code anything or rent a web server. https://www.gmod-lsm.com
An application skeleton for building a loading screen. You can use it to quickly get started building your design. Make sure to read the readme before getting started. https://github.com/glua/load-seed