Custom Loadingurl

Hey guys. I have a custom picture that I want in a loadingurl, dimensions of 700x700. I’ve managed to get the picture into the loadingurl so it’s shown, that was pretty easy but the hard part is that I need help to show that “x Files remaining” on the loadingurl. I still have the code but it doesn’t show up.

Here’s my current code:


<html>
<body>
<center>
<img src="BFG.jpg">
</center>
<script type="text/javascript">
	var iFilesNeeded = 0;
	var iFilesTotal = 0;
	var bDownloadingFile = false;
	
	function SetFilesNeeded( iNeeded )
	{
		iFilesNeeded = iNeeded;
		RefreshFileBox();
	}
	
	function SetFilesTotal( iTotal )
	{
		iFilesTotal = iTotal;
		RefreshFileBox();
	}
	
	function DownloadingFile( filename )
	{
		if ( bDownloadingFile )
		{
			iFilesNeeded = iFilesNeeded - 1;
			RefreshFileBox();
		}
		
		document.getElementById( "loadingtext" ).innerHTML = "Downloading " + filename;
		bCanChangeStatus = false;
		setTimeout( "bCanChangeStatus = true;", 1000 );
		
		bDownloadingFile = true;
		
	}
	
	function SetStatusChanged( status )
	{
		if ( bDownloadingFile )
		{
			iFilesNeeded = iFilesNeeded - 1;
			bDownloadingFile = false;
			RefreshFileBox();
		}
		
		document.getElementById( "loadingtext" ).innerHTML = status;
		bCanChangeStatus = false;
		setTimeout( "bCanChangeStatus = true;", 1000 );
	}
	
	function RefreshFileBox()
	{
		document.getElementById( "files" ).innerHTML = "<img src='download.png' style='position: relative; top: 7px;'> " + iFilesNeeded + " downloads remaining";
		
		if ( iFilesTotal > 0 )
			document.getElementById( "files" ).style.visibility = 'visible';
		else
			document.getElementById( "files" ).style.visibility = 'hidden';
	}
	
	RefreshFileBox();
	
</script>
</body>
</html>

Anyone?

make sure image name is BFG.jpg, NOT bfg.jpg AND NOT BFG.JPG (unless it’s a windows-hosted http server)

<html>
<head>
</head>
<body>
<center>
<img src="BFG.jpg"><!-- <img src='http://loading.garrysmod.com/loading.png'> -->
<div id='loadingtext' style='margin-top: 10px; color: #666; font-family: Arial; font-size: 12px; font-weight: bold;'>Loading Text..</div>
</center>
	<div style='-webkit-box-reflect: below -120px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.1, transparent), to(rgba(255, 255, 255, 1.0))); position: absolute; top: 90%; right: 0; bottom: 0; left: 5%; height: 100px; overflow: show; font-family: Arial; font-size: 24px; font-weight: bold; color: #888' id='files'>
	</div>

<script type="text/javascript">

	keywords = 
	[
	 "Unwelding Boxes.", 
	 "Charging Toolgun.", 
	 "Breaking Addons.", 
	 "Stuffing Ragdolls.", 
	 "Unreticulating Splines.", 
	 "Refuelling Thrusters.", 
	 "Unknotting ropes.",
	 "Painting Barrels.",
	 "Feeding Birds.",
	 "Bathing Father Grigori.",
	 "Server admin is too lazy to "
	 +"copy-paste the code (:",
	 "Decoding Lua's syntax.",
	 "Re-killing Alyx.",
	 "Calibrating Manhacks.",
	 "Cleaning Leafblower.",
	 "Reconfiguring Gravity Matrix.",
	 "Growing Watermelons.",
	 "Mowing Grass.",
	 "Plastering Walls.",
	 "Inflating Balloons.",
	 "Taming Physics.",
	 "Calling Sleep( 1000 ); ",
	 "Server admin is too lazy to "
	 +"copy-paste the code (:",
	 "Unfreezing The Freeman.",
	 "Patching Broken Update.",
	 "Styling Mossman's Hair.",
	 "Reducing lifespan of Alyx.",
	 "Polishing Kliener's Head.",
	 "Delaying Episode 3.",
	 "Changing Physgun Batteries.",
	 "Breaking Source Engine"
	]


	var bCanChangeStatus = true;
	function ChangeText ( )	{
		if ( bCanChangeStatus )
		{
			var keyword = keywords[ Math.floor( Math.random() * keywords.length ) ]
			document.getElementById( "loadingtext" ).innerHTML = keyword;
		}
		
		setTimeout( "ChangeText()", 2500 );
	}
	
	ChangeText();
	
	var iFilesNeeded = 0;
	var iFilesTotal = 0;
	var bDownloadingFile = false;
	
	function SetFilesNeeded( iNeeded )
	{
		iFilesNeeded = iNeeded;
		RefreshFileBox();
	}
	
	function SetFilesTotal( iTotal )
	{
		iFilesTotal = iTotal;
		RefreshFileBox();
	}
	
	function DownloadingFile( filename )
	{
		if ( bDownloadingFile )
		{
			iFilesNeeded = iFilesNeeded - 1;
			RefreshFileBox();
		}
		
		document.getElementById( "loadingtext" ).innerHTML = "Downloading " + filename;
		bCanChangeStatus = false;
		setTimeout( "bCanChangeStatus = true;", 1000 );
		
		bDownloadingFile = true;
		
	}
	
	function SetStatusChanged( status )
	{
		if ( bDownloadingFile )
		{
			iFilesNeeded = iFilesNeeded - 1;
			bDownloadingFile = false;
			RefreshFileBox();
		}
		
		document.getElementById( "loadingtext" ).innerHTML = status;
		bCanChangeStatus = false;
		setTimeout( "bCanChangeStatus = true;", 1000 );
	}
	
	function RefreshFileBox()
	{
		document.getElementById( "files" ).innerHTML = "<img src='http://loading.garrysmod.com/download.png' style='position: relative; top: 7px;'> " + iFilesNeeded + " downloads remaining";
		
		if ( iFilesTotal > 0 )
			document.getElementById( "files" ).style.visibility = 'visible';
		else
			document.getElementById( "files" ).style.visibility = 'hidden';
	}
	
	RefreshFileBox();
	
</script>

</body>
</html>

Okay, so this will enable the show download things?

Thanks for your support!