Apartments: 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-apartments']:Name(...) from the side named in each table.
Server
| Export | Description |
|---|---|
GetApartment(identifier) | Any apartment. |
GetWalkInFrame(name) | Walk-in flats (furniture, phone). |
IsInside(src) | |
WalkInHouseFor(src) | |
WalkInKeyedFor(identifier) | |
WalkInOwner(name) | |
WalkInSummary(identifier) |
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 |
|---|---|---|
apartments:client:LeaveApartment | ||
apartments:client:OpenStash | lumo-housing storage furniture in an apartment opens the apartment's stash. | |
apartments:client:SetHomeBlip | building | |
apartments:client:setupSpawnUI | cData | ── Character selector hand-off ───────────────────────────────────────────── qb-multicharacter, lumo-multicharacter and Qbox fire this after a character loads. With a spawn menu: open it (with the starter pick for new characters). Without one: spawn the player into their apartment ourselves. |
apartments:client:SpawnInApartment | ||
apartments:walkin:moved | id, apartment | Office move finished: new blip, waypoint and hint. |
apartments:walkin:roomsChanged | rooms | Rooms recalibrated by an admin (server/mapping.lua). |
esx:onPlayerLogout | ||
esx:playerLoaded | ||
lumo-apartments:client:doorbell | ||
lumo-apartments:client:enterInstanced | data, first | |
lumo-apartments:client:enterWalkIn | data, spawn, first | |
lumo-apartments:client:leftInstanced | door | |
qb-apartments:client:LastLocationHouse | Spawn menu: "my apartment" / last location inside an apartment. | |
QBCore:Client:OnPlayerLoaded | ||
QBCore:Client:OnPlayerUnload |
Server
| Event | Arguments | Description |
|---|---|---|
apartments:server:CreateApartment | apartmentType, _, firstSpawn | ── Starter contract ──────────────────────────────────────────────────────── |
apartments:server:openStash | name | ── Storage and bed ───────────────────────────────────────────────────────── Also reached by lumo-housing storage furniture (apartments:client:OpenStash). |
apartments:walkin:action | room, action, target | |
apartments:walkin:claim | id | |
apartments:walkin:logout | The bed (door menu or lumo-housing bed furniture): log out in your own or a keyed flat. | |
apartments:walkin:mapRoom | building, number, door, model, heading | |
apartments:walkin:stash | In-room services from the door menu: storage (owner + key holders). | |
lumo-apartments:server:logout | ||
qb-apartments:server:SetInsideMeta | _, _, inside | Selectors clear the flag before spawning somewhere else; setting it is server-only. |
Commands
| Command | Side | Description |
|---|---|---|
/apartment | client | ── Commands ──────────────────────────────────────────────────────────────── /apartment: the panel inside a flat, otherwise this session's walk-in room (blip + waypoint). |
/aptcoords | client | |
/aptdoor | client | /aptdoor: what the client sees at the nearest apartment door (F8 + chat), for diagnosing locks. |
/aptkey | client | |
/aptmap | client | |
/aptrevokekeys | client |