API Reference
Exports
Client Exports
Shutdown
Closes the loading screen manually.
luaexports['HCS_loadingscreen']:Shutdown()
UpdateCharacter
Updates character data on the loading screen UI.
luaexports['HCS_loadingscreen']:UpdateCharacter({ name = 'Max Mustermann', cash = '500 $' })
| Prop | Type |
|---|---|
| character | table (keys from Config.Character.Fields, e.g. name, cash, bank, job, playtime) |
PushConfig
Re-sends the last server payload to the loading screen NUI (no-op if none received yet).
luaexports['HCS_loadingscreen']:PushConfig()
Server Exports
SetPlayerCharacter
Sets a character override for a player (used with a custom/unrecognized framework).
luaexports['HCS_loadingscreen']:SetPlayerCharacter(src, { name = 'Max Mustermann', job = 'Polizei' })
| Prop | Type |
|---|---|
| src | number |
| data | table |
| return | boolean |
GetPlayerCharacter
Returns the resolved character data for a player.
luaexports['HCS_loadingscreen']:GetPlayerCharacter(src)
| Prop | Type |
|---|---|
| src | number |
| return | table |
ClearPlayerCharacter
Removes the character override for a player.
luaexports['HCS_loadingscreen']:ClearPlayerCharacter(src)
| Prop | Type |
|---|---|
| src | number |
RefreshDiscordCache
Forces a refresh of Discord team and gallery cache.
luaexports['HCS_loadingscreen']:RefreshDiscordCache()
| Prop | Type |
|---|---|
| return | boolean |
GetTeamCache
Returns the current team member cache.
luaexports['HCS_loadingscreen']:GetTeamCache()
| Prop | Type |
|---|---|
| return | table |
GetGalleryCache
Returns the current gallery image cache.
luaexports['HCS_loadingscreen']:GetGalleryCache()
| Prop | Type |
|---|---|
| return | table |
Events
Character- und UI-Daten kommen primär beim Connect per deferrals.handover (window.nuiHandoverData). Die Events unten sind optional (Live-Refresh / Exports).
Client Events
Set Data
Pushes the full UI payload to the loading screen.
luaTriggerClientEvent('hcs_loading:setData', src, payload)
| Prop | Type |
|---|---|
| src | number |
| payload | table (character, team, gallery, brand, music, etc.) |
Update Character
Updates only the character section.
luaTriggerClientEvent('hcs_loading:updateCharacter', src, character)
| Prop | Type |
|---|---|
| src | number |
| character | table |
Server Events
Request Data
Optional: full UI payload neu anfordern (z.B. nach SetPlayerCharacter).
luaTriggerServerEvent('hcs_loading:requestData')
Request Character
Optional: nur Character-Daten neu anfordern.
luaTriggerServerEvent('hcs_loading:requestCharacter')