Step 1: Create a folder in your resources folder named ‘loading_screen’.
Step 2: Drag all of your loading screen files into the new folder.
Step 3: Create a new file named ‘__resource.lua’.
Step 4: Insert this in __resource.lua:
-- Latest manifest version, see https://wiki.fivem.net/wiki/Resource_manifest_versions
-- This basically tells the server what files to include when loading
'index.html', -- The name of your main loading screen page (mostly html, but can be php too)
'style.css', -- Your stylesheet file
'background.jpg' -- Maybe you have a background image
-- If you have more files add a comma after 'background.jpg' and follow the pattern
-- Now the important part, tell the server that this file is the loading screen
Step 5: Start the resource file, in this case loading_screen. So in your server.cfg add this:
Don’t hesitate to ask if you want to know more.