Installation
Loading Screen V2 has no dependencies. There is no database, no framework requirement and no item to register.
Requirements
| Dependency | Required? | Notes |
|---|---|---|
| FiveM Server | Yes | Any recent artifact |
| Framework | No | Standalone — works with any framework |
Steps
1. Extract Resource
Place the code9_loading folder into your server's resources/ directory.
2. Remove Other Loading Screens
A server can only show one loading screen. Stop or remove any other resource that declares a loadscreen in its fxmanifest.lua (including the default one some frameworks ship with).
3. Add to server.cfg
ensure code9_loading
4. Make It Yours
Open shared/config.lua and set at least:
Config.server.name— your server's name, shown under the logo during the introConfig.server.logo— your logo (put the file inui/media/)Config.background.video— your background video (put the file inui/media/)Config.music.tracks— your playlistConfig.links.items— your community, channels and storeConfig.rules.sectionsandConfig.controls— your rules, keys and commands
See Config Files for every option.
5. Restart and Reconnect
Restart the resource and reconnect. The settings are handed to the screen each time a player connects, so there is nothing to build: save, restart, reconnect.
Your Own Media
Everything the screen shows lives under ui/media/:
code9_loading/ui/media/
├── logo.png ← your logo (transparent PNG is best)
├── bgvideo-1080p.mp4 ← the background video
├── gallery/ ← gallery pictures
└── music/ ← your own songs (MP3 / OGG)
Replace the files or add your own and point the config at them. Paths are relative to the ui folder ('media/logo.png'); full https:// addresses work too.
Character Selection
By default the screen closes when the game session starts. If your server has a character selection that should appear only after the screen is gone, choose how it closes with Config.game.closeWhen:
| Value | The screen closes when… |
|---|---|
'session' | the world is loaded and the session has started (default) |
'spawned' | the player's character has spawned |
'manual' | your own script asks it to — see below |
With 'manual', close it from your character selection (client side):
exports.code9_loading:close()
-- or
TriggerEvent('code9_loading:close')
Custom Connection Queue
If another resource owns your connection queue and hands its own data to the loading screen, set Config.game.handover = false and hand this resource's data over from your queue:
deferrals.handover(exports.code9_loading:handoverData())
See Exports & Events for details.
