Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Called when the loading screen finishes loading all assets.
- function GameDetails( servername, serverurl, mapname, maxplayers, steamid, gamemode ) {
- //EXAMPLE
- if (mapname == "mapname" || mapname == "mapname.bsp"){
- document.getElementById("loadingimg").src="mapname.png";
- // Real life examples
- //dolls (blue)
- } else if (mapname== "de_dolls_blue"|| mapname== "de_dolls_blue.bsp" ) {
- document.getElementById("loadingimg").src="bluedolls_loading.png";
- //minecraft b5
- } else if (mapname == "ttt_minecraft_b5" || mapname == "ttt_minecraft_b5.bsp" ) {
- document.getElementById("loadingimg").src="minecraft_loading.png";
- //minecraft city
- } else if (mapname == "ttt_minecraftcity_v4" || mapname == "ttt_minecraftcity_v4.bsp" ) {
- document.getElementById("loadingimg").src="minecraftcity_loading.png";
- //minecraft city fixed
- } else if (mapname == "ttt_minecraftcity_v4fixed" || mapname == "ttt_minecraftcity_v4fixed.bsp" ) {
- document.getElementById("loadingimg").src="minecraftcity_loading.png";
- //map wasn't on list here, might as well use a generic loading image
- } else {
- document.getElementById("loadingimg").src="generic_loading.jpg";
- }
- document.getElementById("bgdiv").width = window.innerWidth;
- document.getElementById("bgdiv").height = window.innerHeight;
- }
Advertisement
Add Comment
Please, Sign In to add comment