RedM Loading Screen v2.0.0 Documentation

RedM Loading Screen Documentation

Introduction

This script provides an enhanced loading screen experience for your RedM server, integrating features like Discord/Steam user display, customizable music, patch notes, server rules, social media links, and server hints.

Installation

  1. Ensure Keymaster is installed and working on your server: Download Keymaster.

  2. Download the cas-loadscreenv2 resource and place it within your server's resources folder.

  3. Add ensure cas-loadscreenv2 to your server.cfg file.

Open Source Code: You can access the open-source version of the script here.

For detailed documentation, please refer to our GitBook documentation.

Configuration

The primary configuration for this resource resides in cas-loadscreenv2/config/config.lua.

Config = {}

Config.ServerName = "Your Server Name"
Config.ServerLogo = "URL to your server logo"
Config.ServerDescription = "A brief description of your server"

Config.Discord = {
    enabled = true,
    botToken = "YOUR_BOT_TOKEN_HERE",
    guildId = "YOUR_GUILD_ID_HERE", 
    apiUrl = "https://discord.com/api/v10"
}

Config.Steam = {
    enabled = true,
    apiKey = "YOUR_STEAM_API_KEY_HERE", 
    apiUrl = "https://api.steampowered.com"
}

Config.LoadingScreen = {
    defaultSettings = { -- Player-adjustable settings defaults
        clearScreen = false, -- Hides most UI elements except settings button when enabled. Useful for showcasing video backgrounds.
        playMusicOnStartup = true,
        enableMusic = true,
        -- ... other default settings
    },
    music = {
        tracks = { -- Array of music tracks
            {
                id = "1",
                title = "Track Title",
                artist = "Artist Name",
                duration = 240, -- in seconds
                src = "URL to the track",
                albumCover = "URL to the album cover image"
            },
            -- ... more tracks
        }
    },
    patchNotes = { -- Array of patch notes
        {
            id = "1",
            title = "Patch Note Title",
            description = "Patch note description",
            image = "URL to the patch note image",
            date = "YYYY-MM-DD",
            category = "feature" -- or "improvement", etc.
        },
        -- ... more patch notes
    },
  -- ... rules, socialLinks, serverHints, keybinds are configured similarly
}

Config.LoadingEvents = { -- Customize the loading events and messages displayed
    progressMessages = {
        [0] = "Connecting...",
        -- ... other progress messages
    },
    events = {
        ["loadProgress"] = true, -- Whether to show load progress events
        -- ... other events
    }
}

Config.Debug = {
    enabled = false,
    -- ... other debug settings
}

Usage

The loading screen automatically initializes and displays when a player connects. The player's Discord and/or Steam information will be fetched based on their identifiers and the configured API keys. Players can adjust their settings using the settings icon in the top right corner.

FAQ (Frequently Asked Questions)

  • Q: How do I add more music tracks?

    • A: Add more objects to the Config.LoadingScreen.music.tracks array in config.lua.

  • Q: How do I change the background image?

    • A: Change the Config.LoadingScreen.defaultSettings.customBackgroundUrl or use the settings menu in-game.

Contact/Support

Need help? Join our Discord support server or contact us through Tebex!

Last updated