FiveM | Server | How to add a Loading screen and Loading music? *help*

I currently found tutorials on youtube, but for some reason it does’nt work

Does anyone know how to help me?

Search on the forums next time, plenty of tutorials around.

2 Likes

i try’d everything i might do it wrong couse is still not working

The loading screen is a webpage, search for tutorials on how to make music auto-play on webpages and also make sure you indicate any new file you might add to the _resource.lua file. FiveM servers already come bundles with a resource called keks that substitues the loading screen with a custom webpage, customize it as you need.

what is the screen ratio for the jpeg

Most common aspect ratio is 16:9. (i.e. 1920x1080)

I’ve done everything but how do I use it on the server?

from what I’ve found out it looks like it is running google chrome or chromium or whatever for the loading screen and google stopped audio from being on autoplay in 2018, so prob have to link a video and not audio

Did you find the issue <3

pm me if you’re still having problems and i’ll walk you through it step by step

kinda I just got a soundcloud embed link and hid it behind the loading screen

Being that I love to help this community when very little assistance is offered, here is the code you will need for your HTML Loading file.

Place this just after the < body> statement at the top of your HTML file.

<audio autoplay>
  <source src="Loading.ogg" type="audio/ogg">
  <source src="Loading.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

To test this, since browsers will not autoplay on their own, use the following code:

<audio control autoplay>
  <source src="Loading.ogg" type="audio/ogg">
  <source src="Loading.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

Should you be successful, upon loading the page locally you will see controls like below and when you click play you will hear your audio.

Your browser does not support the audio element.

Copy your .ogg and .mp3 files to the resource folder.
Mine is simply loading_screen.
Remember to edit your _resources.lua file to include the following:

files {
    'index.html',
    'keks.css',
    'bankgothic.ttf',
    'loadscreen.jpg',
    'Loading.ogg',
}

loadscreen 'index.html'

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

Make sure where Loading.ogg is you put the proper file name of your music, as also in the HTML.

Enjoy!

can you help me make a custom loading screen for my server
This is confusing because im new :frowning:

1 Like