Keys, Locks & Property Page
Locks
Every door of a property is in the game's door system and is locked or unlocked as the server says. A door is a doorway: the two leaves of a double door lock together.
| Who | What they can do |
|---|---|
| Owner | Turn every lock of the property. |
| Keyholder | Turn the locks when their key opens the doors. |
| Admin | With the edit ace and Admin.OpenAnyDoor = true, turn any lock in the world. |
Jobs in Doors.ForceJobs | Force a lock. It takes ForceTime milliseconds with a progress bar. |
Locks are turned at the door with E (Doors.Key), within Doors.Distance metres. The porch prompt for buying and the doorbell only shows to people the property does not belong to, so for the household E at the front door is always its lock.
How a Lock Shows
With Prompt = 'sprite' a lock floats in the doorway, shut or open and amber. It is seen within Sprite.Range metres and never through a wall. At a door the player can turn, the key and what it does show beside it. Set Prompt = 'textui' for the ox_lib text UI box instead.
A lock turning is heard by everyone near the door. With Sound.Source = 'auto' this is the deadbolt sound of ox_doorlock when it is running, otherwise the sounds shipped with sd-housing.
Garage and Balcony Doors
The garage doors of the walk-in pack open and shut from the same prompt, for the owner, a key that opens the doors or the garage, or an admin. The sliding balcony doors of walk-in houses also open from the lock prompt.
Keys
An owner can hand out up to Properties.MaxKeys keys per property (6 by default) to whoever stands beside them. For every key the owner sets:
- What it opens: doors, stash, wardrobe, garage, decorating. A new key opens
Manage.DefaultPermsuntil the owner says otherwise. - For how long: an hour, a day, a week or until taken back (
Manage.KeyDurations). - Whether it is on, and a note.
A key can be re-cut, lent for longer or taken back at any time. A keyholder sees their own key and can hand it back.
The Property Page
The property page lists every property a player owns or holds a key to. It is on the home panel inside every house. It can also be opened from anywhere:
- With a command, when
Properties.Manage.Commandis set (for example'property'). It isfalseby default. - From the ox_lib radial menu, when
Properties.Manage.Radial = true. - From your own radial menu, phone app or target option, with the
OpenPropertyMenuexport or thesd-housing:client:openPropertyMenuclient event. See Commands, Exports & Events.
On the page:
| Section | Who | What |
|---|---|---|
| Doors | Owner, keyholders | Each door turned from the page, or all at once, while you are at the property. With Manage.RemoteLocks = true this works from anywhere. |
| Inside | Owner, keyholders | Put the stash and the wardrobe where you stand. |
| Decorating | Owner, and keyholders when Decor.Keyholders is on | Starts decorate mode. |
| Keys | Owner | Who holds a key, what it opens, for how long, and handing out new ones. |
| Activity | Owner | Keys given, changed, handed back and run out, locks turned, and changes of ownership. |
| Give away, sell | Owner | See Selling and Giving Away. |
"At the property" means within Manage.Range metres of its entrance (30 by default).
Stash, Wardrobe and Garage
Each is a point inside the property. An admin places points in the admin panel. With Points.OwnersPlace = true the owner places the stash and the wardrobe from the property page while standing where they want it, within PlaceRange metres of the entrance.
| Point | Needs | Notes |
|---|---|---|
| Stash | ox_inventory | One shared stash per property for its owner and keyholders. Stash.Slots and Stash.Weight. |
| Wardrobe | A clothing resource | Triggers the client event in Wardrobe.Event. |
| Garage | qbx_garages | One garage per property with a garage point. With Garage.Shared = false each person sees only their own vehicles. |
Wardrobe events for common clothing resources:
| Resource | Event |
|---|---|
illenium-appearance | illenium-appearance:client:openOutfitMenu (default) |
qb-clothing | qb-clothing:client:openOutfitMenu |
fivem-appearance | fivem-appearance:client:openWardrobe |
The Doorbell
Someone without a key can ring at the entrance. The owner and keyholders who are online are told who is at which door. Properties.Doorbell.Cooldown is the seconds between rings from one player. The household answers from the home panel or the intercom.
Blips
A player's own properties, and the ones they hold a key to, show on the map with Properties.Blips.Owned. Set Blips.ForSale to a blip table to also show every property for sale.
Door Settings
configs/shared/doors.lua:
| Option | Default | Description |
|---|---|---|
Distance | 1.5 | Metres from a door's middle its lock prompt shows. |
Key | 38 | Control that turns the lock (38 is E). |
StreamRange | 60.0 | Metres within which a property's doors are put in the game's door system. |
Prompt | 'sprite' | 'sprite' or 'textui'. |
Sprite.Range, Sprite.Height, Sprite.Size | 4.0, 1.25, 0.031 | Where and how big the floating lock is. |
Sound.Enabled, Sound.Range, Sound.Volume | true, 14.0, 0.6 | The lock sound. |
Sound.Source | 'auto' | 'auto', 'ox' (always ox_doorlock's) or 'own'. |
LockOnPurchase | true | A property is bought with its doors locked. |
OpenHouse | true | A property for sale stands unlocked so it can be viewed. |
LockOnLeave | false | Lock a property's doors when its last owner or keyholder leaves the server. |
ForceJobs | {} | Jobs that may force any lock: job name and lowest grade, for example { police = 2 }. |
ForceTime | 6000 | Milliseconds a forced lock takes. |
Ram | The battering ram. See Security. | |
Animation | key fob | The animation played when turning a lock. |
Garage.Distance / Garage.Vehicle | 3.0 / 9.0 | Metres from a garage opening the prompt shows on foot, and in a vehicle. |
See the full file and the Properties and Points tables.
