Garry's Mod Wiki
Loading Screen
You can show a custom loading screen to joining users in form of a website.
Loading URL
To specify which website is shown, set the sv_loadingurl
convar.
Via Console
You can set the convar via a command line parameter.
Via Autoexec
You can set the convar in your autoexec.cfg
config file.
URL Parameters
You can specify additional information in the URL via the following inserts:
Steam Id
Insert the user's Steam Id via the %s
variable.
Map
Insert the current map's name via the %m
variable.
Asset URL
Instead of an actual hosted website you can also specify an asset HTML file.
Data URL
It's also possible to encode an HTML file as a Data URL.
HTML page that displays an image:
Transformed into a Data URL:
Simply replace <Image URL>
with your image's URL.
-> Add example images
Loading Pages
This section will not detail creating your page, and assumes you have already designed one.
JavaScript functions
There are several Javascript functions which are called directly by Garry's Mod. To use these, simply create a function with that name in your page - it will be called when the event associated with it happens.
PHP GET parameters
%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.
Ready to use examples
gmod-lsm.com
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
Load Seed
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
gmodload.com
A completely free loading screen creator, with no coding, no webserver, and no watermarks. https://gmodload.com/
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated twice a day. Edits and history are not available.
Last Parsed: Loading...