Skip to main content

Installation

Step-by-step installation guide for Code9 Loading Screen V2

This section

Installation

Loading Screen V2 has no dependencies. There is no database, no framework requirement and no item to register.

Requirements​

DependencyRequired?Notes
FiveM ServerYesAny recent artifact
FrameworkNoStandalone — 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 intro
  • Config.server.logo — your logo (put the file in ui/media/)
  • Config.background.video — your background video (put the file in ui/media/)
  • Config.music.tracks — your playlist
  • Config.links.items — your community, channels and store
  • Config.rules.sections and Config.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:

ValueThe 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):

lua
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:

lua
deferrals.handover(exports.code9_loading:handoverData())

See Exports & Events for details.