Multicharacter: 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-multicharacter']:Name(...) from the side named in each table.
Client
| Export | Description |
|---|---|
GetMugShotBase64(Ped, Transparent) | |
GetPlayerData() | |
IsLoggedIn() |
Server
| Export | Description |
|---|---|
DeleteCharacter(src, id) | |
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) | |
HasPermission(src, groups) | |
IsLoggedIn(src) | |
Login(src, id, data) | |
Logout(src) | |
Notify(src, msg, t) | |
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:setPlayerData | ||
GetMugShotBase64FromServer | characterId | |
qb-multicharacter:client:chooseChar | ||
qb-multicharacter:client:closeNUI | ||
qb-multicharacter:client:closeNUIdefault | externalOwnsSpawn | Finishes character creation when no apartment resource has been handed the player through apartments:client:setupSpawnUI. externalOwnsSpawn is true when a property resource is going to run its own new-character sequence off the player-loaded event — placing the ped and opening the appearance cre |
qb-multicharacter:client:handoff | Releases the character selector so a spawn resource can take over. This resource owns its NUI focus, preview camera, preview peds and idle camera loop, so it is the only thing that can correctly let go of them. It used to rely on the spawn resource doing that implicitly: stock qb-spawn's openUI buil | |
qb-multicharacter:client:spawnLastLocation | position | Places an existing character at their last location when no spawn selector is installed (see Config.LastLocationFallback). The selector has already been released by handoff. |
startCameraLoop | Trigger event to start the loop | |
stopCameraLoop | Trigger event to stop the loop |
Server
| Event | Arguments | Description |
|---|---|---|
qb-multicharacter:server:createCharacter | data | |
qb-multicharacter:server:deleteCharacter | citizenid | |
qb-multicharacter:server:disconnect | ||
qb-multicharacter:server:loadUserData | cData | |
saveMugshot:lumo | mugshotBase64, citizenid |
Commands
| Command | Side | Description |
|---|---|---|
/base64mugshotNormal | client | |
/base64mugshotTransparent | client |