Exports & events ​
Server exports ​
| Export | Description |
|---|---|
buildHandover(source, extra?) |
Returns server identity, player name, theme, configured content, rules, music, language and active provider entries. Merge it into the existing deferrals.handover payload. |
registerTips(list) |
Registers tips under the calling resource name. Each row uses text and optional category. |
registerKeybinds(groups) |
Registers keybind groups using group and items (action/key) or binds. |
registerNews(items) |
Registers news with title, body, optional category/date/image. |
getRulesStatus(source) |
Returns rules version, accepted version and whether trusted acceptance is still needed. |
recordRulesAcceptance(source, version) |
Records the configured rules version for a player. Call only after a trusted server flow verifies consent. |
Examples and complete lifecycle details live in the resource README and integration guide.
Client exports ​
| Export | Description |
|---|---|
handoff(options?) |
Plays the loading outro, then calls both FiveM shutdown natives. Options include reason and fadeMs (0–5000). |
isReady() |
Whether the client resource has started. |
getMusicState() |
Returns the last state Lua knows; loadscreen CEF cannot send live audio state back. |
keepAlive(ms) |
Extends the fallback deadline for a pending handoff, bounded to 10 seconds–5 minutes. |
setStatus(message) |
Replaces the phase detail while another resource prepares a handoff. |
Event np_loadingscreen:handoff requests local handoff. np_loadingscreen:client:update sends a partial browser content update to clients.