Clothing: 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-clothing']:Name(...) from the side named in each table.
Client
| Export | Description |
|---|---|
AddPropertyWardrobePoint(propertyId, coords, label) | Register a lumo-interact prompt on a property's wardrobe point. Housing calls this once per property it loads; the returned id is passed back to remove it. |
DescribeMyClothing() | |
DescribePlayer(serverId, incident) | |
GetClothingCondition() | |
GetPlayerData() | |
GetSkin() | |
GetWornGarments() | |
GetWornSignatures() | |
HandlesSlot(slot) | True when this slot is one the item system manages, so an adapter can fall back to its own behaviour for things that are not garments (gloves, visors). |
IsCharacterCreationActive() | Export to check if character creation is currently active |
IsCreatingCharacter() | |
IsHairTied() | |
IsLoggedIn() | |
IsPresentable() | |
OpenCharacterCreation(gender) | ================= EXPORTS FOR EXTERNAL USE ================= Export for qb-multicharacter and other resources to trigger character creation |
OpenPropertyWardrobe(propertyId, opts) | |
OpenShop(shopId, shopType) | Export to open a specific shop type for admin/player |
OpenTakeOffMenu() | |
OpenWardrobe() | |
OpenWearMenu(slotName) | |
RefitHair() | |
ReloadSkin(health) | |
RemovePropertyWardrobePoint(id) | |
ResolveSlot(slot) | |
Save() | |
SearchClothingEvidence(filters, cb) | |
SetSlot(data) | One call per garment instead of two. data = |
SetVariation(data) | |
SetVariations(list) | |
StartAttendantWash(location, signatures, method) | |
StoreUndo() | |
TakeOffSlot(slot) | |
ToggleHairTie(silent) | |
ToggleSlot(slot) | |
WearSlot(slot) |
Server
| Export | Description |
|---|---|
CanCapture(src) | |
DeleteCharacter(src, id) | |
GetCharacters(src) | |
GetCitizenId(src) | |
GetClothingCondition(citizenid, signatures) | Other resources: current cleanliness of a player's outfit (0-100 clean). |
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) | |
GiveGarmentItem(src, slot, drawable, texture, extra) | Hand a specific garment to a player as an item. Useful for job kit rewards and for testing without buying anything. exports['lumo-clothing']:GiveGarmentItem(src, slot, drawable, texture, extra) |
HasPermission(src, groups) | |
IsLoggedIn(src) | |
IsWearing(src, slot) | |
Login(src, id, data) | |
Logout(src) | |
Notify(src, msg, t) | |
OwnsGarment(citizenid, gender, props) | Other resources: does this character own this garment? |
RecordClothingEvidence(payload) | Anything that wants to log a description it already has. |
ResolveSlot(name) | Canonical slot key for any alias, so adapters do not need their own table. |
SearchClothingEvidence(filters) | Police/CAD: look up stored clothing descriptions. |
SetMetaData(src, key, value) | |
TakeOffGarment(src, slot) | |
ToggleGarment(src, slot) | |
useClothingItem(event, item, inventory, slot) | ox_inventory item definitions call this export. Resolve the actual slot on the server; never trust metadata sent from a client. |
useDetergent(event, _, inventory) | ox_inventory calls items by export rather than through CreateUseableItem, so the same entry point is exposed both ways. Detergent deliberately does not share the clothing item handler: it is a consumable, not a garment. |
useSoap(event, _, inventory) | |
WearGarmentFromInventory(src, slot) | Server-side wardrobe API. Any resource can drive clothing through these instead of writing ped components itself, and get the item conversion, the saved-skin write and the dupe checks for free. |
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 | ||
hospital:client:Revive | ||
lumo-clothing:bridge:job | job | |
lumo-clothing:bridge:loaded | ||
lumo-clothing:client:applySlot | slot, drawable, texture | The server has already written the saved skin; this only mirrors the change onto the ped and into skinData so a later save stays consistent. |
lumo-clothing:client:attendantWash | data | |
lumo-clothing:client:cancelWash | ||
lumo-clothing:client:confirmTakeOff | data | |
lumo-clothing:client:confirmWear | data | |
lumo-clothing:client:create-first-character | opts | |
lumo-clothing:client:CreateFirstCharacter | opts | |
lumo-clothing:client:openJobLocker | data | |
lumo-clothing:client:openLockerWardrobe | data | |
lumo-clothing:client:openTakeOff | ||
lumo-clothing:client:openWear | slotName | |
lumo-clothing:client:payWash | data | |
lumo-clothing:client:restorePersonalClothes | data | |
lumo-clothing:client:toggleSlot | data | |
lumo-clothing:client:useHairTie | ||
lumo-clothing:client:useSoap | ||
lumo-clothing:client:useWashItem | ||
lumo-clothing:client:washFinished | Fired by the attendant and item routes so the dirty-texture swap and the cached condition here stay in step with them. | |
lumo-clothing:client:wearJobUniform | data | |
lumo:admin:captureDone | info | |
lumo:admin:receiveGlobalItems | items | |
lumo:admin:receiveMainShopStatus | status | |
lumo:applyAndSaveSkin | skin | client.lua |
lumo:applyTattoos | tattoos | |
lumo:cartPurchased | payload | |
lumo:clearNPCs | ||
lumo:clothing:condition | data | |
lumo:openOutfits | ||
lumo:openPropertyWardrobe | propertyId, opts | |
lumo:openShop | shopId | ================= EVENTS ================= |
lumo:openWardrobe | ||
lumo:outfitsReload | outfits | |
lumo:outfitsUpdated | outfits | ================= SERVER PUSHES ================= |
lumo:postPurchaseSave | payload | |
lumo:purchaseDenied | payload | |
lumo:purchaseFailed | ||
lumo:rebuildBlips | ||
lumo:rebuildZones | ||
lumo:rp:describeResult | payload | |
lumo:rp:requestDescription | officerSrc, incident | The officer asked; answer to the server, which stores it and replies to them. |
lumo:serviceApproved | info | Server said OK: commit and close |
lumo:serviceDenied | reason | Server said NO: restore & close |
lumo:setDebug | state | |
lumo:shopItemsChanged | shopId | |
lumo:shopsUpdated | d | |
qb-clothes:client:CreateFirstCharacter | Public QB/Qbox appearance creator contract. | |
qb-clothes:loadSkin | isNew, model, data | Server pushes saved skin after login/reload |
qb-clothing:client:loadOutfit | oData | |
qb-clothing:client:loadPlayerClothing | data, ped | |
qb-clothing:client:openOutfitMenu |
Server
| Event | Arguments | Description |
|---|---|---|
lumo-clothing:loadPlayerSkin | ||
lumo-clothing:saveSkin | model, skin | |
lumo-clothing:server:buyDetergent | locationId | The laundromat counter sells the cleaning item. Price, distance and money are all decided here; the client only asks. |
lumo-clothing:server:releaseMachine | ||
lumo-clothing:server:takeOff | slot | |
lumo-clothing:server:toggleSlot | slot | The one event every other resource should fire. Whatever the radial menu, a command or a job script asks for, the decision of which way to go is made here against the saved skin rather than against whatever the ped looks like. |
lumo-clothing:server:wearItemSlot | itemSlot | Wear one specific carried garment, addressed by its inventory slot. Used by the /wear picker so choosing between two coats is unambiguous. |
lumo-clothing:server:wearSlot | slot | |
lumo:admin:addOwner | shopId, identifier | |
lumo:admin:addOwnerFromPlayer | shopId, serverId | |
lumo:admin:createShop | d | ================= ADMIN OPS (CLOTHING-ONLY) ================= |
lumo:admin:deleteItem | shopId, itemId | |
lumo:admin:deleteShop | shopId | |
lumo:admin:getGlobalItems | search, category, gender, page, pageSize | |
lumo:admin:getMainShopStatus | ||
lumo:admin:importGlobalItems | shopId, itemIds | |
lumo:admin:processCapturedImage | data | ========================================= [SECTION] EVENTS ========================================= |
lumo:admin:removeMainShop | ||
lumo:admin:saveCapturedItem | data | |
lumo:admin:saveItem | shopId, payload | |
lumo:admin:setMainShop | data | |
lumo:admin:setShopEnabled | shopId, enabled | |
lumo:admin:setShopMargin | shopId, margin | Owners tune their own margin; admins can set it for any shop. |
lumo:admin:unlinkItem | shopId, itemId | ========================================= [SECTION] EVENTS ========================================= |
lumo:admin:updateShopLocation | shopId, coords | |
lumo:buyItem | data | ========================================= [SECTION] EVENTS ========================================= |
lumo:deleteOutfit | outfitName, outfitId | Delete outfit |
lumo:purchaseCart | shopId, method, itemIds | ========================================= [SECTION] EVENTS ========================================= |
lumo:purchaseService | shopId, method | ============== SERVICE PURCHASE (barber / tattoo) ============== |
lumo:renameOutfit | outfitId, newName | ========================================= [SECTION] EVENTS ========================================= |
lumo:rp:describeResponse | officerSrc, incident, description | The described player's client answers here; we store it and hand it back. |
lumo:rp:reportWear | signatures, dirt, damage, reason | |
lumo:saveNamedOutfit | outfitName, model, skinData | |
lumo:saveTattoos | tattooData | Save Tattoos |
lumo:setFavoriteOutfit | outfitId, turnOn | ========================================= [SECTION] EVENTS ========================================= |
lumo:wearFavorite | Quick-wear favorite | |
lumo:wearOutfit | outfit | Wear outfit (visual on client) |
qb-clothes:loadPlayerSkin | ||
qb-clothing:loadPlayerSkin |
Commands
| Command | Side | Description |
|---|---|---|
/describe | client | |
/hairtie | client | |
/lumo_admin | client | |
/lumo_debug | server | ======================================== [SECTION] COMMANDS ======================================== |
/openshop | client | Opens a shop from anywhere, so admins only. |
/takeoff | client | |
/testcreation | client | Command to test character creation (admin only) |
/undress | client | |
/wear | client |