Skip to content

percilator666/perc-loading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loading Screen

A modern, high-performance loading screen for FiveM featuring manual shutdown capabilities and full NUI integration. This script provides a seamless transition for players entering your server with support for high-quality video backgrounds and synchronized audio.

Features

  • Manual Shutdown Control: Utilizes loadscreen_manual_shutdown for a polished hand-off between the loading screen and the game world.
  • Dynamic Media Support: Support for .webm video backgrounds or any standard image extension for static backgrounds.
  • Integrated Music Player: Built-in audio support with configurable default volume levels.
  • Persistent Volume: Audio settings are saved to each player's local cache, ensuring their volume preference persists across server joins.
  • Real-time Log Tracking: Features an onLogLine event handler to pass client loading messages directly to the UI.
  • Data Handover: Uses server-side deferrals to pass configuration data directly to the NUI during the connection process.
  • Clean Design: Optimized for performance.

Installation

  1. Ensure your server is running a recent FXServer build.
  2. Place the perc-loading folder into your resources directory.
  3. Configure your assets, colors, and music in shared/config.lua.
  4. Add ensure perc-loading to your server.cfg.

Configuration

The loading screen is highly customizable via the config.lua file:

  • Logo: URL for your server's branding image.
  • Color: RGB formatted string for UI accents.
  • Background:
    • Videos: Must use the .webm extension for optimal NUI compatibility.
    • Images: Supports standard image extensions (e.g., .png, .webp, .jpg).
  • Music: Set your preferred .mp3 source and the default volume (0.0 to 1.0).

Technical Details

Manual Shutdown

Because this script uses manual shutdown, the loading screen will not disappear until the client explicitly triggers ShutdownLoadingScreenNui(). This ensures players don't see unfinished world textures during the initial spawn.

Volume Caching

To improve the user experience, the NUI stores the user's volume preference in localStorage. This prevents the music from resetting to the default 0.25 every time the player connects.

Convars

The script automatically sets sv_showBusySpinnerOnLoadingScreen to false to maintain a clean, custom aesthetic during the handover.

Preview

The loading screen provides a professional first impression with smooth transitions and custom branding. External image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages