gta6/prompts
ui
Vaultintermediateui

Custom Server Loading Screen (Music + Progress)

A framework-agnostic pre-spawn NUI loading screen with background media, a music player, and a real session-ready handover that shuts the loading NUI down cleanly.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~53 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A custom server loading screen shown before spawn, with background media, a music player, and a live player-count handover from the server. It listens for the session to actually start before fading out and calling ShutdownLoadingScreenNui, so players never get stranded on a black screen. Loading screens are saturated on Tebex, so this one sells on branding plus a real server-info handshake.

Prompt Template

You are writing a FiveM resource: a pre-spawn loading screen via the loading…

🔒 Eyes-only — locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth — both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access — pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts — the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates — new niches as the market moves
Get the Vault — $199

$49 for 60 · $199 for all 510 + intelligence — one-time, no subscription.

Expected Output

The reference Lua lives at content/expected-outputs/ui/18-server-loading-screen.lua. It starts media on resource start, polls NetworkIsSessionStarted for a clean handover to ShutdownLoadingScreenNui,…

🔒 Eyes-only — locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth — both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access — pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts — the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates — new niches as the market moves
Get the Vault — $199

$49 for 60 · $199 for all 510 + intelligence — one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Premature shutdown — calling ShutdownLoadingScreenNui before the session starts drops the player into black.
  • Wrong message channel — the loading NUI only hears SendLoadingScreenMessage, not SendNUIMessage.
  • Fake player count — client-side counts are unreliable; read GetPlayers() on the server.

Corrective re-prompt: "Gate ShutdownLoadingScreenNui behind a NetworkIsSessionStarted poll and only fire it once. Use SendLoadingScreenMessage(json.encode(...)) for every NUI update during the loading phase, and source the player count from the server via GetPlayers() and GetConvarInt('sv_maxclients', 48), returned through loadscreen:info."

Framework Integration

  • ESX: No ESX object exists during loadscreen; keep it framework-free and only read GetPlayers() server-side.
  • QBCore: Same — the QBCore object isn't ready pre-spawn; the server event is safe because it runs server-side at any time.
  • QBox: Identical; if you want a job-gated MOTD, read exports.qbx_core:GetPlayer in the server handler only.

Profit Potential

$80–$1200/mo on Tebex (expected ~$300). [INFERRED] priced within the $50-389 script band against the signal-scraper tebex_snapshot corpus (n=100, median seller $11.85K/mo) for a saturated but evergreen niche.

Trend Signal

saturated — inferred: Loading screens are flooded on Tebex; only branded/animated variants stand out — saturated but evergreen.

Sales Angle

Win a crowded category on production value: animated branded media, a working music player, and a live player count that proves the server is alive. Recommended Tebex price $79.

Difficulty & Ship Time

intermediate · ships in 2-4h.