Interface Suite: exports, events & commands
Generated from the Lua in the release. Descriptions are the comments above each definition. Event names and export names are public contracts: they do not change between versions.
Exports
Call them as exports['lumo-ui']:Name(...) from the side named in each table.
Client
| Export | Description |
|---|---|
AddGlobalObject(params) | |
AddGlobalPed(params) | |
AddGlobalVehicle(params) | |
AddRadialOption(item, id, owner) | |
AllowTargeting(on) | |
CancelProgress() | |
CancelTapMinigame() | |
ChangeText(text, position, key) | |
ChangeTextUI(text, key) | |
CloseInput() | |
CloseMenu() | |
CloseRadial() | |
Create3DTextUI(id, data) | |
Create3DTextUIOnPlayers(id, data) | |
Delete3DTextUI(id) | |
Delete3DTextUIOnPlayers(id) | |
DisableNUI() | |
DisableTarget() | |
DisplayTextUI(text, key) | |
DrawText(text, position, key) | |
EnableNUI() | |
GetGlobalObjectData(label) | |
GetGlobalPedData(label) | |
GetGlobalPlayerData(label) | |
GetGlobalTypeData(kind, label) | |
GetGlobalVehicleData(label) | |
GetLocationAnchor() | Read-only location anchor for companion activity trackers. |
GetMapShape() | |
GetPeds() | |
GetPlayerData() | |
GetRadarRect() | Radar's visible screen rect { x, y, w, h, round }, or nil while it is hidden. |
GetStatus(name) | |
GetTargetBoneData(bone, label) | |
GetTargetEntityData(entity, label) | |
GetTargetModelData(model, label) | |
GetZoneData(name) | |
HideKeys() | |
HideMinigame() | |
HideNoise() | |
HideText() | |
HideTextUI() | |
HideTimer(id) | |
InteractionMessage(message) | |
IsDoingSomething() | |
IsHudHidden() | |
IsLoggedIn() | |
IsMenuOpen() | |
IsRadialOpen() | |
IsTargetActive() | |
IsTargetSuccess() | |
IsTextUIShown() | |
IsTimerActive(id) | |
KeyPressed() | |
LeftTarget() | |
Notify(text, notifyType, duration, icon, title) | |
OpenMenu(entries, sort, keepFirst) | |
Progress(action, onFinish) | |
ProgressWithStartAndTick(action, onStart, onTick, onFinish) | |
ProgressWithStartEvent(action, onStart, onFinish) | |
ProgressWithTickEvent(action, onTick, onFinish) | |
RemoveGlobalObject(labels) | |
RemoveGlobalPed(labels) | |
RemoveGlobalVehicle(labels) | |
RemoveRadialOption(id) | |
SetBusy(busy) | Older scripts flip the busy flag by hand around their own UI. |
SetHudHidden(hidden) | Releasing one activity must not undo /hidehud or another activity's request. |
SetPhoneState(open, width, left) | |
SetStatus(name, value) | |
ShowHeader(entries) | |
ShowInput(definition) | |
ShowKeys(hints) | |
ShowMinigame(payload) | |
ShowNoise(payload) | |
ShowText(text, position, key) | |
ShowTimer(options) | |
StartTapMinigame(options, callback) | |
StartTimer(options) | |
StopTimer(id) | |
Update3DTextUI(id, text, theme) | |
UpdateGlobalObjectData(label, data) | |
UpdateGlobalPedData(label, data) | |
UpdateGlobalPlayerData(label, data) | |
UpdateGlobalTypeData(kind, label, data) | |
UpdateGlobalVehicleData(label, data) | |
UpdateMinigame(progress, outcome) | |
UpdateNoise(level, sneaking) | |
UpdatePedsData(index, data) | |
UpdateTargetBoneData(bone, label, data) | |
UpdateTargetEntityData(entity, label, data) | |
UpdateTargetModelData(model, label, data) | |
UpdateTimer(id, changes) | |
UpdateZoneData(name, data) |
Server
| Export | Description |
|---|---|
AddStress(src, amount) | Server-side helpers for other resources (no client trust involved). |
DeleteCharacter(src, id) | |
GetAdminSettings() | |
GetCharacterName(src) | Character name ("First Last") on any framework, or nil before a character is loaded. lumo-chat-theme's /me uses it. |
GetCharacters(src) | |
GetCitizenId(src) | |
GetFramework() | |
GetLicenses(src) | |
GetLoggedInPlayers() | |
GetPlayer(src) | |
GetPlayerByCitizenId(id) | |
GetPlayerData(src) | Exports for third-party scripts and for other Lumo resources running standalone. PlayerData is QB-shaped; see docs/STANDALONE.md. |
GetSkin(id) | |
GetStress(src) | |
HasPermission(src, groups) | |
IsLoggedIn(src) | |
Login(src, id, data) | |
Logout(src) | |
Notify(src, msg, t) | |
RemoveStress(src, amount) | |
SetMetaData(src, key, value) |
Events
- Client events are triggered on the player:
TriggerClientEvent(name, src, ...)from the server, orTriggerEvent(name, ...)on the client. - Server events are triggered with
TriggerServerEvent(name, ...). The server checks the player, distance and amounts itself; never rely on a client to do it.
Client
| Event | Arguments | Description |
|---|---|---|
esx:onPlayerLogout | ||
esx:playerLoaded | xPlayer, isNew, skin | |
esx:setJob | ||
esx:setPlayerData | ||
esx_status:onTick | list | esx_status reports 0..1000000 per status, with percent precomputed. |
hud:client:LoadMap | ||
hud:client:OnMoneyChange | ||
hud:client:SetAircraftHudVisibility | visible | |
hud:client:SetHudVisibility | visible | |
hud:client:ShowAccounts | Retired money widget: still accepted so callers do not error. | |
hud:client:ToggleAirHud | ||
hud:client:UpdateBuffs | buffs | |
hud:client:UpdateHarness | hp | |
hud:client:UpdateNeeds | hunger, thirst | |
hud:client:UpdateNitrous | level, has | |
hud:client:UpdateNitrousState | level, has, isActive | |
hud:client:UpdateStress | value | |
lumo-hud-ui:client:adminUpdated | settings | |
lumo-hud-ui:client:announcement | message | |
lumo-hud-ui:client:changeText | text, position, key | |
lumo-hud-ui:client:hideText | ||
lumo-hud-ui:client:notify | text, notifyType, duration, icon, title | |
lumo-hud-ui:client:openSettings | adminTab | |
lumo-hud-ui:client:phoneState | open, width, left | |
lumo-hud-ui:client:saveLayout | layout | |
lumo-hud-ui:client:showText | text, position, key | |
lumo-hud-ui:client:startLayoutEdit | layout | Live layout editor (started from /ui). |
lumo-ui:client:cancelProgress | ||
lumo-ui:client:closeMenu | ||
lumo-ui:client:notify | text, notifyType, duration, icon, title | |
lumo-ui:client:openMenu | entries, sort, keepFirst | |
lumo-ui:client:progress | action, onFinish | |
lumo-ui:client:targetDebug | on | |
qb-admin:client:ToggleDevmode | ||
QBCore:Client:OnGangUpdate | gang | |
QBCore:Client:OnJobUpdate | job | QBCore/Qbox push the job and gang on their own events as well. |
seatbelt:client:ToggleCruise | state | |
seatbelt:client:ToggleSeatbelt | state |
Server
| Event | Arguments | Description |
|---|---|---|
hud:server:GainStress | amount | |
hud:server:RelieveStress | amount |
Commands
| Command | Side | Description |
|---|---|---|
/-lumoui_menufocus | client | |
/-lumoui_radial | client | |
/-lumoui_target | client | |
/cinematic | client | |
/circlefit | client | |
/hidehud | client | |
/hudnotify | client | /hudnotify fires a HUD notification, to check the modules lift above it. |
/hudphone | client | |
/hudphonedebug | client | ── Diagnostics ──────────────────────────────────────────────────────────── /hudphone [width] fakes the phone being open so the HUD offset can be tested on its own. If the modules move with this but not with the real phone, the problem is the qb-phone -> here hand-off, not the HUD. |
/lumotimertest | client | |
/lumoui_target | client | |
/lumouitest | client | |
/targetdebug | server | |
/uitap | client |