๐Ÿ–ผ๏ธLOADING SCREEN V2

Note: This documentation covers all configuration files you have access to. The loading screen automatically detects your framework (ESX, QBCore, QBox) and displays player data during connection.

1) Overview

Risk Loading Screen is a modern, customizable loading screen for FiveM servers featuring:

  • ๐ŸŽต Built-in music player with playlist

  • ๐Ÿ‘ฅ Team member showcase (via Discord)

  • ๐Ÿ–ผ๏ธ Photo gallery (from Discord channel)

  • ๐Ÿ“Š Live player statistics (name, bank balance, job)

  • ๐ŸŽจ Fully customizable colors and branding

  • ๐Ÿ“œ Built-in rules overlay (F1 key)

  • โฐ Real-time clock with customizable format

  • ๐Ÿ”— Social media links

  • ๐ŸŽฌ Transparent mode with video background support

  • ๐ŸŒ Multi-language ready


2) File Structure

You have access to these configuration files:

risk-loadscreen/
โ”œโ”€โ”€ client.lua                    โ† Auto-close & showcase command
โ”œโ”€โ”€ editable/
โ”‚   โ”œโ”€โ”€ config.js                โ† Main configuration (branding, music, links, rules)
โ”‚   โ”œโ”€โ”€ config.css               โ† Color scheme customization
โ”‚   โ””โ”€โ”€ server.lua               โ† Discord bot token, team members, gallery
โ””โ”€โ”€ html/
    โ””โ”€โ”€ assets/
        โ”œโ”€โ”€ music/               โ† Add your music files here
        โ”‚   โ”œโ”€โ”€ song1.mp3
        โ”‚   โ”œโ”€โ”€ cover1.png
        โ”‚   โ””โ”€โ”€ ...
        โ”œโ”€โ”€ BGBehind.png         โ† Background image (transparent mode)
        โ””โ”€โ”€ video.mp4            โ† Background video (optional)

3) Discord Integration Setup

Step 1: Create Discord Bot

  1. Click "New Application"

  2. Name your application (e.g., "My Server Bot")

  3. Go to "Bot" tab โ†’ Click "Add Bot"

  4. Under "Token" section โ†’ Click "Reset Token" โ†’ "Copy"

  5. Save this token securely (you'll need it in Step 2)

Step 2: Enable Required Intents

Still in the Bot tab:

  1. Scroll down to "Privileged Gateway Intents"

  2. Enable:

    • โœ… Server Members Intent

    • โœ… Message Content Intent

  3. Click "Save Changes"

Step 3: Invite Bot to Your Server

  1. Go to "OAuth2" โ†’ "URL Generator"

  2. Select scopes:

    • โœ… bot

  3. Select bot permissions:

    • โœ… Read Messages/View Channels

    • โœ… Read Message History

  4. Copy the generated URL

  5. Open URL in browser โ†’ Select your Discord server โ†’ Authorize

Step 4: Configure in server.lua

Open editable/server.lua:

Replace YOUR_BOT_TOKEN_HERE with the token from Step 1.

โš ๏ธ IMPORTANT: Never share your bot token publicly! Keep it secret.


The gallery displays the last 8 images posted in a Discord channel.

Setup Instructions:

1. Enable Developer Mode in Discord:

  • Discord Settings โ†’ Advanced โ†’ Enable Developer Mode

2. Get Channel ID:

  • Right-click on the channel โ†’ Copy Channel ID

3. Configure in server.lua:

Examples:

Screenshots channel:

Community photos channel:

Disable gallery (leave empty):

๐Ÿ“Œ NOTE: Make sure your bot has access to read the channel! If the gallery shows no images, check bot permissions.


5) Team Members Configuration

Display your staff team with Discord avatars and roles.

Setup Instructions:

1. Get Discord User IDs:

  • Right-click on user in Discord โ†’ Copy User ID

2. Configure in server.lua:

Parameters:

  • userId โ€” Discord User ID (18 digits)

  • role โ€” Role text shown on card (uppercase recommended)

  • color โ€” Card color: 1 (green), 2 (blue), or 3 (yellow)

Color Examples:

Color 1 (Green) โ€” Owners/Devs:

Color 2 (Blue) โ€” Admins/Managers:

Color 3 (Yellow) โ€” Support/Moderators:

Disable team page:

โš ๏ธ NOTE: If a user's Discord avatar doesn't load, verify:

  1. User ID is correct (18 digits)

  2. Bot token is valid

  3. User hasn't blocked the bot


6) Color Customization โ€” config.css

Open editable/config.css to change the color scheme:

Yellow/Gold (Default):

Blue/Cyan:

Purple/Pink:

Red/Orange:

Green/Lime:

๐Ÿ’ก TIP: Use ColorPickerarrow-up-right to find hex codes for custom colors.


7) Main Configuration โ€” config.js

Open editable/config.js for all branding and functionality settings.

General Settings

Transparent Mode Examples:

Standard mode (image background):

Transparent with dark overlay:

Transparent with video background:

Fully transparent (no overlay):


Tab Visibility

Hide specific tabs:

Hide all extra tabs:


Clock & Date Format

Examples:

European format:

American format:

Asian format:


First Join Placeholders

Change defaults:


Music Player Configuration

How to add music:

1. Prepare files:

  • Audio: MP3 format recommended

  • Cover: PNG/JPG, 512x512px recommended

2. Add files to folder:

  • Place audio in html/assets/music/

  • Place covers in html/assets/music/

3. Add to config:

Music player options:

Start with first song:

Lower volume:

Higher volume:


Popular icons:

Remove unwanted links:

Add more links:


Rules Configuration

Change hotkey:

Customize rules:

Translate to another language:


Labels & Branding

Customize branding:

Change panel descriptions:

Navigation buttons:

Rules hint box:


8) Auto-Close & Showcase Command

Open client.lua:

To enable auto-close, add to your server.cfg:

Showcase command (preview loading screen in-game):

Usage in-game:

Disable showcase command:

Change command name:


9) Complete Configuration Examples

Example 1: Minimal Setup (No Discord)

editable/server.lua:

editable/config.js:


editable/server.lua:

editable/config.js:


Example 3: Video Background

editable/config.js:

Place city-timelapse.mp4 in html/assets/ folder.


Example 4: Blue Color Scheme

editable/config.css:


10) Troubleshooting

Possible causes:

  • Wrong channel ID

  • Bot doesn't have access to channel

  • No images posted in channel

Solution:

  • Verify GALLERY_CHANNEL ID is correct

  • Check bot can read channel (permissions)

  • Post images in the channel


โŒ Team members show no avatars

Possible causes:

  • Wrong user IDs

  • Invalid bot token

  • User blocked the bot

Solution:

  • Copy User IDs again (right-click โ†’ Copy User ID)

  • Verify bot token is correct

  • Check user hasn't blocked bot


โŒ Music doesn't play

Possible causes:

  • Wrong file paths

  • Files not uploaded

  • Browser blocking autoplay

Solution:

  • Check file paths in songs array

  • Ensure MP3 files are in html/assets/music/

  • Click anywhere on screen to allow audio


โŒ Loading screen won't close

Possible causes:

  • Framework not detected

  • Multicharacter script not triggering events

Solution:

  • Add to server.cfg: set risk_loadscreen_autoclose 1

  • Check framework is started before loading screen

  • Verify multicharacter script compatibility


โŒ Discord bot not working

Possible causes:

  • Invalid token

  • Bot not invited to server

  • Missing intents

Solution:

  • Generate new token in Discord Developer Portal

  • Re-invite bot with correct permissions

  • Enable Server Members Intent and Message Content Intent


โŒ Rules overlay won't open

Possible causes:

  • Wrong key configured

  • Key conflict with other scripts

Solution:

  • Try different key in rules.key

  • Test with F2 or F3 instead of F1


11) Best Practices

โœ… Always test showcase command โ€” Use /loadscreen to preview changes โœ… Optimize music files โ€” Use compressed MP3 (128-192 kbps) to reduce download time โœ… Use square images for covers โ€” 512x512px recommended โœ… Keep gallery channel active โ€” Post new screenshots regularly โœ… Update team members โ€” Remove staff who left โœ… Use high-quality background video โ€” 1080p 30fps, under 50MB โœ… Test on mobile โ€” Some players connect from phones โœ… Keep rules updated โ€” Review and update rules monthly โœ… Backup config files โ€” Before making major changes โœ… Never share bot token โ€” Keep it private and secure


12) Quick Start Checklist

  • [ ] Install Discord bot and get token

  • [ ] Configure DISCORD_TOKEN in editable/server.lua

  • [ ] Get Discord channel ID for gallery

  • [ ] Configure GALLERY_CHANNEL in editable/server.lua

  • [ ] Get Discord User IDs for team members

  • [ ] Configure TEAM_MEMBERS in editable/server.lua

  • [ ] Customize serverName and roleplayText in config.js

  • [ ] Add your music files to html/assets/music/

  • [ ] Update songs array in config.js

  • [ ] Configure social links in config.js

  • [ ] Customize rules entries in config.js

  • [ ] Change colors in editable/config.css

  • [ ] Test with /loadscreen command in-game

  • [ ] Restart server and verify loading screen works

Last updated