Housing: 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-housing']:Name(...) from the side named in each table.
Client
| Export | Description |
|---|---|
GetAccess() | |
getCurrentHouse() | Radial menus ask these to show the housing ring: the home id while inside, else nil. |
getEnteredHouse() | |
IsInside() | ── Exports ───────────────────────────────────────────────────────────────── |
IsPosing() | |
OpenBrowser() | |
OpenDecorate() | |
OpenWalkInDecorate(name) | |
PoseRadial() | |
SetWalkInHouse(name) | lumo-apartments furnishes its flats through these (server side: StoreAllDecorations). SetWalkInHouse(name | nil): the walk-in apartment whose room the player stands in. |
StartPose(key) | |
StopPose() |
Server
| Export | Description |
|---|---|
CheckHasKey(license, citizenid, name, src) | qb-garages signature: (license, citizenid, house, source) |
GetHomes(identifier) | |
GetListings() | Homes on the market, for phone apps: the first free unit the bank sells per house (one row per building) plus every player listing. Buying still happens at the door. |
HasKey(identifier, name) | |
IsInside(src) | |
StoreAllDecorations(name) |
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 | ||
lumo-housing:client:access | access | |
lumo-housing:client:alarm | data | |
lumo-housing:client:all | all | |
lumo-housing:client:doorbell | label | |
lumo-housing:client:enter | data | |
lumo-housing:client:forceExit | door | |
lumo-housing:client:furniture | key, op, data | |
lumo-housing:client:house | name, view | |
lumo-housing:client:media | key, id, state | |
lumo-housing:client:offer | offer | |
lumo-housing:client:pet | key, data | |
lumo-housing:client:photo | t, ref | |
lumo-housing:client:photoData | ref, data | |
lumo-housing:client:raider | on | |
lumo-housing:client:rested | health | |
lumo-housing:client:walkOut | door | Login put us at a position saved inside a home that is no longer ours. |
qb-houses:client:enterOwnedHouse | homeId | |
qb-houses:client:LastLocationHouse | homeId | ── Spawn menus ("last location" / "my house") ────────────────────────────── |
qb-houses:client:toggleDoorlock | ── Radial menu actions (while inside a home) ─────────────────────────────── | |
QBCore:Client:OnPlayerLoaded | ||
QBCore:Client:OnPlayerUnload |
Server
| Event | Arguments | Description |
|---|---|---|
housing:server:removeHouseKey | homeId, holder | |
housing:setInside | _, value | |
lumo-housing:server:decorPhoto | token, key, data | |
lumo-housing:server:furnitureLeave | ||
lumo-housing:server:furnitureStash | key, id | |
lumo-housing:server:hello | ||
lumo-housing:server:offerAnswer | accept | |
lumo-housing:server:openStash | name, unit | |
lumo-housing:server:photo | token, data | Admin upload (latent event: a picture is far bigger than a normal event). |
lumo-housing:server:photoGet | ref | Anyone may look at a listing's pictures. |
lumo-housing:server:raidCancel | ||
lumo-housing:server:restore | homeId | Spawn menus: "last location" picked (client event → server), or spawning elsewhere. |
Commands
| Command | Side | Description |
|---|---|---|
/housecoords | client | |
/lumohousing_endtour | client |