[How-to] Custom Loading Screen with Music

Copy the example file to the root of your resources folder, if the server is still running, type refresh first before trying to start the resource. If you type refresh, it should say that it found a new resource.

Capture

For example, my modified loading screen exists in “server-data\resources\loadscreen” which “__resource.lua” is located directly in the “loadscreen” folder. I was unable to get music working though.

Does anyone know how I can randomize the background image? I have multiple images labeled “loadscreen” followed by a number such as “loadscreen_03”.

Well, I found out that if you remove the path “music” and just add Loading.ogg renamed as Loading.mp3 to the base file, it will be perfect.

For anyone still having problems you need to download the file in, or transcode the file to, MP3 format. Note that renaming an .ogg file to .mp3 is not sufficient, it actually needs to be in MP3 format. I’m assuming that all the people above me saying to rename the file likely renamed an MP3 format file from .mp3 to .ogg in the first place and simply renamed it back.

I’m not sure when or why Chromium dropped support for OGG but only MP3 seems to work now. I spent several hours transcoding between different Vorbis and Opus formats and debugging the index.html before finally trying out a genuine MP3 and feeling like a dumbass for not trying it earlier. What’s odd is that I searched for documentation on Chromium and it all indicated support for both Opus and Vorbis format OGGs. Is FiveM using some kind of simplified build of Chromium?

I don’t have the index.html file the only one I have is music

I cant find the download link

1 Like

I agree, because I used a website to convert my music from mp3 to ogg and it didn’t work, I’ve tried to convert it using audacity, and I worked that time.

when creating the index.html file. Do i fill in the text as a regular text document before i turn it into and index.html file>?