I know that gmod supports the %map %steamid and %gamemode or whatever they are in the URL for loading screen's. So I was wondering if anyone knew a method to create a loading screen that chose a certain picture, based on what map was being loaded.
Thanks.
[code]function GameDetails( servername, serverurl, mapname, maxplayers, steamid, gamemode ) {
document.body.style.background = "#f3f3f3 url( '" + mapname + ".jpg') no-repeat right top";
}[/code]
From that example, you should be able to have an image such as gm_flatgrass.jpg which will be loaded as the background style for the body element
Very simple way really
based it off functions documented on the wiki
[url]http://wiki.garrysmod.com/page/Loading_URL#/Javascript_functions[/url]
Sorry, you need to Log In to post a reply to this thread.