SLS - Loading Screen

Hello Facepunch!

This is my first “addon” release, although I wouldn’t really call this a real addon that goes in the addons folder. This is SLS (Sabre’s Loading Screen).

This is a very simple loading screen that can display text and change the background image of the page based on what map is being played on currently.

Here is SLS running on my webserver: http://thesabreslicer.site.nfoservers.com/opgaming/exloading/index.php?mapname= (change mapname to whatever map you want to see).

Requirements

  1. A webserver that runs PHP

  2. A garrysmod server

  3. sv_loadingurl set to the url of your webserver / where you are going to upload the files, with ?mapname=%m on the end of the url

  4. Images for the background to change to (they also have to be named the same as the map intended for them to load on)

Instructions

  1. Download the zip

  2. Place images in the images directory (named correctly)

  3. Change sv_loadingurl in your config.cfg if you haven’t already

  4. Upload the files to your webserver

Download

Download here (v1.0): https://www.github.com/TheSabreSlicer/SLS/

Direct download link (master): https://github.com/TheSabreSlicer/SLS/archive/master.zip

If you have any questions please ask.

The license is GPL v2.


Appreciate my work? Donate. I thank you so much if you choose to, I am trying to buy a new domain name. Thanks to Scratch.

Seems cool, I assume music is auto-set to some random radio/yt video?

I don’t really like hearing music in loading screen.

The music portion is not included in this release. It actually uses Flash player to randomly play music on my webserver. It currently doesn’t work in garry’s mod, though. :pwn:

Why there’s a ‘pause’ button ?
Correct me if i’m wrong but we can’t even click it while joining.

Yes, you are right!
It’s just that the only way to play audio in the garry’s mod loading screen is with Flash, and there are no flash audio players with no pause button. Sorry.

Also, the music is only on my loading screen, not on the public release. If you want me to get you one with music, just PM me.

lol no

Chuck up a youtube embed, and make it essentially invisible with your stylescript

That way you won’t get fined for distributing music (If your music is not loyalty free)



var html='<div class="video"><iframe width="1" height="1" src="http://www.youtube.com/v/MPxVMpeVRGI&start=25?version=3&autoplay=1&loop=1;vq=medium" frameborder="0" allowfullscreen></iframe></div>';
document.write(html);


Oh how I remember the days of Garry’s Mod when icons flew across your screen as it loaded and if you tried clicking anything you’d most likely stop responding.

I would do this, but I want to randomly play one of nine songs every time the page is loaded. This cannot be achieved with YouTube embeds very simply.

They’re called arrays for a reason
http://thunderwave.net/vinylchan/rpload

F5 spam all you want

Sorry, I’m new to php and coding. I’ll look into that. Thanks.

Well, it’s not that bad. Just need to work a bit more on the style. :smiley:

I actually really appreciate this! I’ve recently been looking into how to get the loading screen to be dependent on the map and was thinking of making a coderhire job since while I know the design aspect of loading screens, I’m absolutely useless at the coding side.

So thanks a lot for this. Quick thing, will the image size scale to the player’s monitor?

I believe it does when you go from a big image to a small screen, but if the screen resolution is bigger than the image, it will align in the top left. That’s why I have all my images at least 1080x1920.

I tested it with a 24" desktop (like 1920x1200)

The bottom shows the background colour

I’ll probably find a css value to fix this, It crops off a side to display an image across the whole screen (Like Fill mode on Windows Backgrounds)

Edit:


background-size:cover;

Don’t hold me too it

Yeah, my images are not all the same, and I still have to add some for some maps. I will check this out and possibly fix it, but I am busy with exams coming up soon, so we’ll see.

Isn’t this song from like Geometry dash or uhh some other IOS game similar to Impossible game?

No, it’s from a steam game called Electronic Super Joy.

Hey, I placed the files and such on my dedi, but I get an error when I go to the url in a browser. The issue is:

I’m not sure if this is an issue on my end, but I’ve tried a couple of things out to fix it, but can’t seem to get it working. Any help is appreciated, and I apologize if this is an issue on my end.

Let me look into it. It works fine on my server, but I will test it on my secondary server.
I’ll post back here in a few minutes.

EDIT: Try going to your URL and adding ?mapname=insertmapnamehere

See if that fixes the errors. Also, would you mind PMing me your url (if it’s public) so I can take a look?