跳到主内容

加载画面生成器

一个 RedM 加载画面资源:背景图片或视频、音乐、真实的进度条和日志行,打包成 zip 下载。

查看文档

文本

背景

音乐

加载与 resource

预览模拟进度和日志事件;在游戏中由 RedM 发送真实事件。

fxmanifest.lua
fx_version 'cerulean'
game 'rdr3'
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'

name 'my_loadscreen'
description 'Loading screen made with fivemad.com/redm/tools/loading-screen'

loadscreen 'html/index.html'
loadscreen_cursor 'yes'
loadscreen_manual_shutdown 'yes'

client_script 'client.lua'

files {
    'html/index.html',
}

这些说明目前只有英文。

Install

  1. Download the zip and unpack it into your resources folder.
  2. Add ensure my_loadscreen (your resource name) to server.cfg.
  3. Only one loading screen can be active. Stop or remove any other resource with a loadscreen line, such as the one in the VORP recipe.

What it listens to

While a player joins, RedM sends the page loadProgress with a fraction from 0 to 1 andonLogLine with the current log message. The bar and the log line are filled from those, so they show real progress and not a timer.

Closing it

Without "Close it on spawn" the screen closes when a script calls ShutdownLoadingScreen, whichspawnmanager does when it spawns the player. With it, the resource keeps the screen up until playerSpawned fires and then calls ShutdownLoadingScreen andShutdownLoadingScreenNui. That event comes from spawnmanager, so keep it running, or change the event in client.lua to the one your framework fires after character select.

Size

Every file in the resource is downloaded by each player before the screen can show, so a 200 MB video means a long black screen first. A compressed webm under 20 MB or a single image is the safe choice.

更多 RedM 工具