Skip to content

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 ​

ExportDescription
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, or TriggerEvent(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 ​

EventArgumentsDescription
apartments:client:LeaveApartment
apartments:client:OpenStashlumo-housing storage furniture in an apartment opens the apartment's stash.
apartments:client:SetHomeBlipbuilding
apartments:client:setupSpawnUIcData── 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:movedid, apartmentOffice move finished: new blip, waypoint and hint.
apartments:walkin:roomsChangedroomsRooms recalibrated by an admin (server/mapping.lua).
esx:onPlayerLogout
esx:playerLoaded
lumo-apartments:client:doorbell
lumo-apartments:client:enterInstanceddata, first
lumo-apartments:client:enterWalkIndata, spawn, first
lumo-apartments:client:leftInstanceddoor
qb-apartments:client:LastLocationHouseSpawn menu: "my apartment" / last location inside an apartment.
QBCore:Client:OnPlayerLoaded
QBCore:Client:OnPlayerUnload

Server ​

EventArgumentsDescription
apartments:server:CreateApartmentapartmentType, _, firstSpawn── Starter contract ────────────────────────────────────────────────────────
apartments:server:openStashname── Storage and bed ───────────────────────────────────────────────────────── Also reached by lumo-housing storage furniture (apartments:client:OpenStash).
apartments:walkin:actionroom, action, target
apartments:walkin:claimid
apartments:walkin:logoutThe bed (door menu or lumo-housing bed furniture): log out in your own or a keyed flat.
apartments:walkin:mapRoombuilding, number, door, model, heading
apartments:walkin:stashIn-room services from the door menu: storage (owner + key holders).
lumo-apartments:server:logout
qb-apartments:server:SetInsideMeta_, _, insideSelectors clear the flag before spawning somewhere else; setting it is server-only.

Commands ​

CommandSideDescription
/apartmentclient── Commands ──────────────────────────────────────────────────────────────── /apartment: the panel inside a flat, otherwise this session's walk-in room (blip + waypoint).
/aptcoordsclient
/aptdoorclient/aptdoor: what the client sees at the nearest apartment door (F8 + chat), for diagnosing locks.
/aptkeyclient
/aptmapclient
/aptrevokekeysclient