> For the complete documentation index, see [llms.txt](https://tk-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tk-scripts.gitbook.io/docs/tk_housing/config.md). Agents can also search and read this documentation through its [MCP server](https://tk-scripts.gitbook.io/docs/~gitbook/mcp).

# Config

The options in the Housing config files for a FiveM server, with their defaults and what they change.

Most options are in `tk_housing/config/config.lua`; a section names its file when it is another one. Times in the files are milliseconds unless the comment says otherwise; the tables give them in readable units.

## Framework and integrations

| Option                    | Default         | What it does                                                                                                                                                                                                                                                      |
| ------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.DebugMode`        | `false`         | Prints extra debug lines while you set the script up.                                                                                                                                                                                                             |
| `Config.Framework`        | `'esx'`         | `'esx'` or `'qb'`. Qbox uses `'qb'`.                                                                                                                                                                                                                              |
| `Config.NotificationType` | `'esx'`         | `'ox'`, `'esx'`, `'qb'` or `'mythic'`. `'ox'` needs the ox\_lib line in `fxmanifest.lua`.                                                                                                                                                                         |
| `Config.Locale`           | `'en'`          | Language file from `locales/`: `'en'`, `'fi'` or `'fr'`.                                                                                                                                                                                                          |
| `Config.UseOxLib`         | `false`         | ox\_lib text UI and vehicle properties. Needs the ox\_lib line in `fxmanifest.lua`.                                                                                                                                                                               |
| `Config.Target`           | `'none'`        | `'ox'` or `'qb'` for target zones; `'none'` uses key prompts and markers.                                                                                                                                                                                         |
| `Config.Inventory`        | `'default'`     | `'default'` (ESX only), `'qb_old'`, `'qb_new'`, `'ox'` or `'qs'`. House keys and furniture items need one other than `'default'`.                                                                                                                                 |
| `Config.Clothing`         | `'illenium'`    | Script that wardrobes and mirrors open: `'illenium'`, `'fivem-appearance'`, `'qs-appearance'`, `'bl_appearance'`, `'crm-appearance'`, `'tgiann-clothing'`, `'op-clothing'`, `'rcore_clothing'`, `'qb-clothing'`, `'ak47_qb_clothing'`, `'esx_skin'` or `'17mov'`. |
| `Config.Weather`          | `'cd_easytime'` | Weather script paused while a player is inside: `'none'`, `'cd_easytime'`, `'qb-weathersync'`, `'renewed'`, `'av_weather'`, `'weathersync'`, `'esx_weather'` or `'custom'` (edit `SetWeatherSync`).                                                               |
| `Config.Dispatch`         | `'default'`     | Break-in alerts: `'tk'`, `'cd'`, or `'default'` for your own code in `ReportBreakIn`.                                                                                                                                                                             |
| `Config.HelpNotification` | `false`         | Help notification instead of 3D text for prompts.                                                                                                                                                                                                                 |
| `Config.MenuAlign`        | `'top-left'`    | Where ESX menus open.                                                                                                                                                                                                                                             |

## Inside weather and interface

| Option                                | Default                             | What it does                                                                      |
| ------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------- |
| `Config.InsideWeather.weather`        | `'SMOG'`                            | Weather forced while inside a property.                                           |
| `Config.InsideWeather.hour`, `minute` | `19`, `0`                           | Clock forced while inside.                                                        |
| `Config.InsideWeather.timecycle`      | `'MPApartHigh'`                     | Timecycle modifier inside; empty or `nil` for none. `timecycleStrength` is `1.0`. |
| `Config.InsideWeather.timecycleVars`  | four exposure and reflection values | Extra timecycle variables, shell interiors only.                                  |
| `Config.UISettings.color`             | `'blue'`                            | Primary colour of the housing UI, one of the names listed beside it in the file.  |
| `Config.UISettings.shade`             | `6`                                 | 1 (lightest) to 9 (darkest).                                                      |
| `Config.UISettings.theme`             | `'dark'`                            | `'dark'` or `'light'`.                                                            |
| `Config.UISettings.animations`        | `true`                              | Animations in the housing UI.                                                     |

## Commands

`Config.Commands` names the admin and agent commands; `false` turns one off. [Housing commands](https://tk-scripts.gitbook.io/docs/tk_housing/commands.md) says what each does and who may run it.

| Option                                 | Default                                                    |
| -------------------------------------- | ---------------------------------------------------------- |
| `addProperty`                          | `'addproperty'`                                            |
| `adminPanel`                           | `'adminhousing'`                                           |
| `shellCreator`, `shellEditor`          | `'shellcreator'`, `'shelleditor'`                          |
| `removeUnusedProperties`               | `'removeunusedproperties'`                                 |
| `removePropertyOwner`                  | `'removepropertyowner'`                                    |
| `dropBackups`                          | `'housing_dropbackups'`                                    |
| `clearThumbnails`                      | `'housing_clearthumbnails'`                                |
| `bakeThumbnails`, `stopBakeThumbnails` | `'housing_bakethumbnails'`, `'housing_stopbakethumbnails'` |

## Controls

`Config.Controls` uses [FiveM control IDs](https://docs.fivem.net/docs/game-references/controls/).

| Option                     | Default                     | What it does                                                                               |
| -------------------------- | --------------------------- | ------------------------------------------------------------------------------------------ |
| `interact`                 | `38` (E)                    | A spot's first option.                                                                     |
| `interactExtra`            | `{47, 74, 29}` (G, H, B)    | A spot's second, third and fourth option.                                                  |
| `takePhoto`, `cancelPhoto` | `38` (E), `194` (Backspace) | Photo mode.                                                                                |
| `getUp`                    | `22` (Space)                | Gets up from furniture. Update the `seat_get_up_hint` locale if you change it.             |
| `stopBrowsing`             | `194` (Backspace)           | Stops browsing a TV screen.                                                                |
| `toggleDoorLock`           | `182` (L)                   | Locks or unlocks the MLO door you stand at; `false` turns it off.                          |
| `furnish`                  | 21 keys                     | Keys in the furnish mode: place, remove, rotate, snap, gizmo, free camera, nudge and copy. |
| `areaPicker`               | 12 keys                     | Keys in the area tool of the add-property wizard.                                          |

`Config.AreaPicker` sets how the area, entrance and door tools aim, the wall heights (`defaultHeight` `10.0`, `minHeight` `1.0`, `maxHeight` `60.0`), the snap grid sizes `{0.5, 1.0, 2.0}` and the free camera. `Config.Dist` sets how close a player must be to interact: house `2`, garage `3.5`, door `2`, exit `2`, garage exit `3.5`, storage and wardrobe spots `2`, and yard furniture is visible from `100`.

## Jobs, admins and property rules

| Option                                                              | Default                                                 | What it does                                                                                                                                      |
| ------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Jobs.realEstate`                                            | `{real_estate = 0, realestate = 0}`                     | Job name and minimum grade of real-estate agents.                                                                                                 |
| `Config.Jobs.police`                                                | `{police = 0, leo = 0, sheriff = 0}`                    | Jobs that can enter every property.                                                                                                               |
| `Config.JobOwnedProperties.enabled`                                 | `true`                                                  | A job can own a property, assigned from the admin panel.                                                                                          |
| `Config.JobOwnedProperties.defaults`                                | access `0`, manage `'boss'`, furnish and storage `true` | Minimum grade to enter, grade that manages (`'boss'` or a number), and whether members furnish and open storages. Per-job overrides go in `jobs`. |
| `Config.JobOwnedProperties.selling`, `transferring`                 | enabled; proceeds `'seller'`                            | Whether a job property can be sold or transferred; `'burn'` removes the sale money.                                                               |
| `Config.JobOwnedProperties.billing`, `mortgage`                     | `true`, `true`                                          | Job properties get bills, which a manager pays, and can carry a mortgage.                                                                         |
| `Config.ShowPropertyName`                                           | `true`                                                  | Adds the property name to the door label.                                                                                                         |
| `Config.EnableRemoving`, `EnableEditing`                            | `true`, `true`                                          | Removing or editing properties that have no owner.                                                                                                |
| `Config.EnableCustomSpots`                                          | `true`                                                  | Custom spots in the property creator.                                                                                                             |
| `Config.SpotKinds`                                                  | 12 kinds                                                | Spot kinds offered in the property creator and shell editor. `'battery'` is commented out; it needs `Config.Battery.enable`.                      |
| `Config.AllowAdmins.createProperty`, `removeProperty`               | `true`, `true`                                          | Admins create and remove properties.                                                                                                              |
| `Config.AdminGroups`                                                | `{admin = true}`                                        | Framework groups that count as admins.                                                                                                            |
| `Config.MaxProperties`                                              | `99`                                                    | Properties one player can own.                                                                                                                    |
| `Config.SellBackPercentage`                                         | `50`                                                    | Percent of the price paid back on a sale to the server.                                                                                           |
| `Config.MaxPermissions`                                             | `10`                                                    | Players who can hold access to one property.                                                                                                      |
| `Config.DisablePreviewing`, `DisableSelling`, `DisableTransferring` | `false`                                                 | Turns those actions off for player-owned properties.                                                                                              |
| `Config.NonOwnedMLODoorsUnlocked`                                   | `true`                                                  | Doors of unowned MLO properties stay unlocked.                                                                                                    |

## Property list and manager

| Option                                         | Default             | What it does                                                                                                                                                          |
| ---------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.PropertyList.command`                  | `'propertylist'`    | Opens the property list; `false` turns it off.                                                                                                                        |
| `Config.PropertyList.item`                     | `''`                | Usable item that opens the list; `''` for none.                                                                                                                       |
| `Config.PropertyList.showAllUnownedProperties` | `true`              | Lists every unowned property.                                                                                                                                         |
| `Config.PropertyList.buyFrom`                  | `'anywhere'`        | `'list'` sells only through the list; pair it with `showAllUnownedProperties = false` so agents list a property first.                                                |
| `Config.PropertyList.agents`                   | `'both'`            | Who sells as an agent: `'job'` (`Config.Jobs.realEstate`), `'business'` (`Config.RealEstateBusiness`), `'both'` or `'none'`. Also decides who may run `/addproperty`. |
| `Config.PropertyList.listing`                  | `'everyone'`        | Who can list a property for sale: `'everyone'` or `'agents'`.                                                                                                         |
| `Config.PropertyManager.command`               | `'propertymanager'` | Opens the manager for your properties; `false` turns it off.                                                                                                          |
| `Config.PropertyManager.item`                  | `''`                | Usable item that opens the manager.                                                                                                                                   |
| `Config.PropertyManager.buttons`               | see the file        | Buttons shown outside (`enter`) and inside (`exit`): lock, change code, permissions, furnish, security, bills, mortgage, transfer, sell.                              |

## Furnishing

Options are in `Config.Furnishing`.

| Option                                 | Default                                         | What it does                                                                                                                                                                                 |
| -------------------------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enable`                               | `true`                                          | Furnishing on or off.                                                                                                                                                                        |
| `command`, `key`                       | `'furnish'`, `'F7'`                             | Command and default key; players rebind it in the game's key bindings.                                                                                                                       |
| `acquisition`                          | `'instant'`                                     | `'instant'` buys and places in one step; `'inventory'` buys first and places from storage.                                                                                                   |
| `storage`                              | `'property'`                                    | Inventory mode: `'player'` keeps bought furniture with the player, as the `furniture` item when `Config.Inventory` is not `'default'`; `'property'` shares it with everyone who can furnish. |
| `buyAt.menu`, `buyAt.shop`             | `true`, `false`                                 | Inventory mode: buy from the furnish menu, the furniture shop, or both.                                                                                                                      |
| `fulfilment`                           | `'instant'`                                     | Inventory mode: `'delivery'` leaves a box at the front door after `delivery.time` (15 minutes).                                                                                              |
| `sellPercentage`                       | `50`                                            | Percent paid back when a placed piece is removed.                                                                                                                                            |
| `sellBack`                             | `false`                                         | Inventory mode: removed pieces are sold instead of returned.                                                                                                                                 |
| `maxStorages`, `maxFurniture`          | `false`                                         | Limits per property; `false` is unlimited. A property or interior can override them.                                                                                                         |
| `item`                                 | `'furniture'`                                   | Item for player storage and exclusive furniture.                                                                                                                                             |
| `removeOnSell`                         | `true`                                          | Removes the furniture when the property is sold.                                                                                                                                             |
| `freecam`                              | `true`                                          | Free camera while furnishing.                                                                                                                                                                |
| `styling.variants`, `styling.stacking` | `true`, `true`                                  | Swap a piece for a look-alike model; pieces placed on top of others move with them.                                                                                                          |
| `placement`, `snapping`                | see the file                                    | How the cursor finds a surface and how pieces line up. Raise `snapping.overlap` (`0.01`) if you see gaps.                                                                                    |
| `buildParts.enable`                    | `true`                                          | Sells Shell Creator walls, floors, stairs and railings as furniture.                                                                                                                         |
| `buildParts.free`, `price`             | `true`, `250`                                   | Build parts skip the shop, or cost `price` each.                                                                                                                                             |
| `buildParts.categories`                | all on except `doors`                           | Build-part groups listed. Doors placed as furniture do not open.                                                                                                                             |
| `shop`                                 | a shop at `vec4(70.70, -1567.44, 29.60, 54.48)` | The furniture shop for `buyAt.shop`: ped, blip, label and an optional `item` that opens it.                                                                                                  |
| `delivery`                             | 15 minutes, collect within 1 hour               | Delivery time, box model and how long a box waits before the buyer gets the order.                                                                                                           |
| `thumbnails`                           | 256 px, `'webp'`                                | How furniture thumbnails are taken in game and cached. Players with a screen smaller than `minUploadResolution` (1280 × 720) do not upload them.                                             |
| `gizmo`                                | move and rotate on                              | Move and rotate handles (G), local axes (Tab), the nudge step and how far from the property they work (`maxDist` `50`).                                                                      |

## Motels, doorbell and police lockdown

| Option                                | Default               | What it does                                                                              |
| ------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------- |
| `Config.EnableMotels`                 | `true`                | Motel rooms are rented for a fixed time and free up when it ends.                         |
| `Config.Motel.duration`               | 24 hours              | Rental period, in minutes in the file.                                                    |
| `Config.Motel.allowExtend`            | `true`                | Guests check in again to extend.                                                          |
| `Config.Motel.refundOnCheckout`       | `false`               | Refunds unused time on early checkout.                                                    |
| `Config.Motel.oneRoomPerPlayer`       | `true`                | One motel room per player.                                                                |
| `Config.Doorbell.notifyAlways`        | `true`                | Notifies the owner even when they are not inside.                                         |
| `Config.Doorbell.cooldown`, `maxDist` | 2.5 seconds, `10`     | Time between rings, and how far from the door a visitor can be let in.                    |
| `Config.PoliceLockdown.enable`        | `true`                | Police seal properties from the door menu.                                                |
| `Config.PoliceLockdown.jobs`          | `{police = 0}`        | Job and minimum grade that may seal; every member of the job can enter a sealed property. |
| `Config.PoliceLockdown.barrier.model` | `prop_barrier_work05` | Barrier at a sealed door; `false` or `''` for none.                                       |

## Lockpicking, breaching and keys

| Option                       | Default                        | What it does                                                                                                        |
| ---------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| `Config.Lockpicking.door`    | on, `'lockpick'`, 4 pins, 20 s | Lockpicking other players' doors. `playersWithAccessNeeded` (`0`) sets how many players with access must be online. |
| `Config.Lockpicking.storage` | on, `'lockpick'`, 3 pins, 15 s | Lockpicking storages. Swap the minigame in `RunLockpickMinigame`.                                                   |
| `Config.Breaching.enable`    | `true`                         | Police force open doors they hold no key to.                                                                        |
| `Config.Breaching.item`      | `''`                           | Item police must carry, never used up; `''` for none.                                                               |
| `Config.Breaching.duration`  | 4.5 seconds                    | Breach time, plus `lockGradeDuration` (1 second) per reinforced lock grade.                                         |
| `Config.Keys.enable`         | `false`                        | Owners cut physical keys. Needs `Config.Inventory` other than `'default'`.                                          |
| `Config.Keys.item`           | `'house_key'`                  | Key item.                                                                                                           |
| `Config.StorageBlacklist`    | empty                          | Items that cannot go into property storages, one `name = true` line each.                                           |

## Garage

Options are in `Config.Garage`.

| Option                                                 | Default          | What it does                                                                                |
| ------------------------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------- |
| `menu`                                                 | `'default'`      | `'default'`, `'jg-advancedgarages'`, or `'custom'` for your code in `OpenGarageMenu`.       |
| `clearEntrances`                                       | `false`          | Clears NPCs from garage entrances.                                                          |
| `cooldown`                                             | 2 seconds        | Time between garage entries and exits.                                                      |
| `exitOffset`, `entryOffset`, `elevatorOffset`          | `3.0`            | Vehicle spawn offsets.                                                                      |
| `canStore.NPCVehicles`, `canStore.OtherPlayerVehicles` | `true`, `true`   | Which vehicles can be stored.                                                               |
| `default`                                              | `'Centre'`       | Garage that lost vehicles are moved to.                                                     |
| `propertyName`                                         | `'Property #%s'` | Garage name your garage script sees for cars in a property garage; `%s` is the property ID. |

## Blips, property types and markers

`Config.Blips` sets the `owned`, `on_sale`, `access` and `occupied` blips; the last two are off. `Config.PropertyTypes` lists the types an agent picks for a property: House, Garage, Apartment, Warehouse, Office and Motel (`rental = true`). The first entry is the default, and each type can override blip fields.

| Type field     | Default | What it does                                                    |
| -------------- | ------- | --------------------------------------------------------------- |
| `maxPerPlayer` | `false` | How many of this type one player can own. Not for rental types. |
| `maxOnServer`  | `false` | How many of this type can exist on the server.                  |

`Config.Markers` draws markers at interaction points when `Config.Target = 'none'`; every marker is off by default. `Config.FurnitureUses` holds one row per thing a placed prop can do, with its distance, marker, locale label and icon; a furniture entry opts in with `uses = {'storage'}`.

## Rent and bills

| Option                      | Default                                                        | What it does                                                                                                                                |
| --------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Rent.interval`      | 12 hours                                                       | How often rent is charged.                                                                                                                  |
| `Config.Rent.paymentMode`   | `'automatic'`                                                  | `'automatic'` takes it from the bank; `'manual'` is paid in the property menu and needs `Config.Bills.enable`.                              |
| `Config.Rent.onNonPayment`  | `'repossess'`                                                  | `'repossess'` puts the property back on sale; `'lock'` blocks entry until paid.                                                             |
| `Config.Rent.gracePeriod`   | 24 hours                                                       | How long rent stays unpaid before that happens, only with bills on.                                                                         |
| `Config.Bills.enable`       | `true`                                                         | Electricity, water and internet bills.                                                                                                      |
| `Config.Bills.paymentMode`  | `'manual'`                                                     | `'manual'` is paid in the door menu.                                                                                                        |
| `Config.Bills.onNonPayment` | `'lock'`                                                       | `'lock'` or `'repossess'`. Police can still enter a locked property.                                                                        |
| `Config.Bills.gracePeriod`  | 24 hours                                                       | How long a bill stays unpaid before that happens.                                                                                           |
| `Config.Bills.allowToggle`  | `true`                                                         | Owners disconnect a service, which stops its bill.                                                                                          |
| `Config.Bills.historyDays`  | `30`                                                           | Days paid bills are kept; `0` keeps them.                                                                                                   |
| `Config.Bills.services`     | electricity 0.4 % of the price, internet 500, water 0 plus use | Each service's `costModel` (`'percent'` or `'flat'`), `amount` and daily `interval`. Water adds 60 per shower, 10 per sink and 90 per bath. |

## Electricity, heating and power

| Option                                              | Default           | What it does                                                                                                                  |
| --------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `Config.Electricity.mode`                           | `'basic'`         | `'basic'` is a flat bill; `'advanced'` bills the watts furniture draws and lets generators and batteries power wired devices. |
| `Config.Electricity.baseWatts`, `pricePerKwh`       | `250`, `18`       | Advanced mode: watts every owned property draws, and the grid price.                                                          |
| `Config.Electricity.defaultPolicy`                  | `'local_first'`   | `'local_first'`, `'grid_first'` or `'off_grid'`.                                                                              |
| `Config.Electricity.furnitureWatts`, `standbyWatts` | see the file      | Watts per kind in use and on standby; a furniture entry can override them.                                                    |
| `Config.Electricity.wiring.requireItem`             | `false`           | Wiring needs `wiring.item` (`'wire_tool'`). Cable length is capped at `35.0` with `12` points.                                |
| `Config.Temperature.enable`                         | `false`           | Indoor temperature, heated or cooled by furniture with `temperature = 'heat'` or `'cool'`.                                    |
| `Config.Temperature.controlPermission`              | `'owner'`         | `'owner'` (managers too) or `'use'` (anyone inside) sets the thermostat.                                                      |
| `Config.Temperature.defaultTarget`                  | `22.0`            | Starting thermostat in °C, between `minTarget` `16.0` and `maxTarget` `28.0`.                                                 |
| `Config.Temperature.outdoor.source`                 | `'native'`        | `'native'` reads the game weather and clock; `'custom'` calls `GetOutdoorTemperature`.                                        |
| `Config.Temperature.effects.enable`                 | `true`            | Screen tint when a player is too hot or cold for 2 minutes.                                                                   |
| `Config.Generator.enable`                           | `true`            | Fuel-powered backup electricity.                                                                                              |
| `Config.Generator.requireGenerator`                 | `false`           | Electricity always needs a fuelled, running generator.                                                                        |
| `Config.Generator.fuelItems`                        | `{diesel = 3600}` | Item and seconds of runtime it adds. A generator holds 24 hours.                                                              |
| `Config.Battery.enable`                             | `false`           | Batteries charged by wired generators. Needs `Config.Electricity.mode = 'advanced'`.                                          |

## Lights, frames and the assistant

| Option                           | Default       | What it does                                                                               |
| -------------------------------- | ------------- | ------------------------------------------------------------------------------------------ |
| `Config.Lights.enable`           | `true`        | Furniture with a `light` field gives off light.                                            |
| `Config.Lights.switches`         | `true`        | Wall switches work; `false` keeps lamps on.                                                |
| `Config.Lights.blackout`         | `'bills'`     | When the interior's own light goes off: `'bills'` while unpaid, `'always'`, or `false`.    |
| `Config.Lights.control`          | `'furnish'`   | Who changes blinds, blackout and all lights at once: `'anyone'`, `'furnish'` or `'owner'`. |
| `Config.Lights.maxDrawn`         | `8`           | Lights drawn per frame, nearest first.                                                     |
| `Config.Frames.enable`           | `true`        | Picture frames show an image link or an in-game photo.                                     |
| `Config.Frames.maxPerProperty`   | `12`          | Frames with a picture per property.                                                        |
| `Config.Frames.hosts`            | `{}`          | Allowed image hosts; `{}` allows any https host.                                           |
| `Config.Assistant.enable`        | `true`        | Wall tablet that greets you, announces guests and reads your bills.                        |
| `Config.Assistant.persona`       | `'haviland'`  | `'angel'`, `'haviland'` or `'og'`; owners change it on the tablet.                         |
| `Config.Assistant.voice`         | `true`        | Recorded voice lines. Needs game build 3717 or newer.                                      |
| `Config.Assistant.requireTablet` | `true`        | `false` lets the assistant talk with no tablet placed.                                     |
| `Config.Assistant.moments`       | all on        | Moments the assistant comments on.                                                         |
| `Config.Pole.enable`, `hireCost` | `true`, `500` | Hire a dancer at a dance pole.                                                             |

## Music, cooking and television

| Option                               | Default                            | What it does                                                                                            |
| ------------------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `Config.Music.enable`                | `true`                             | Furniture with a `speaker` field opens the music player, heard only inside the property.                |
| `Config.Music.allowCustomUrl`        | `true`                             | Players paste their own links. `sources` turns stream, YouTube, SoundCloud and Spotify links on or off. |
| `Config.Music.maxSources`            | `4`                                | Streams playing at once per player.                                                                     |
| `Config.Music.search.enable`         | `true`                             | Song search and radio directory, no API key. `stationCountry` filters stations by country code.         |
| `Config.Music.stations`              | 11 stations                        | Preset stations. A `url` must be a direct https audio stream, not AAC or m3u8.                          |
| `Config.Cooking.enable`              | `true`                             | Ovens and microwaves open the recipe menu.                                                              |
| `Config.Cooking.itemImagePath`       | `'nui://ox_inventory/web/images/'` | Where recipe item images load from; `false` for none.                                                   |
| `Config.Cooking.recipes`             | 7 recipes                          | `label`, `type` (`'oven'` or `'microwave'`), `ingredients`, `results`, `duration` and `anim`.           |
| `Config.Television.enable`           | `true`                             | Furniture with a `tv` field plays video on its screen.                                                  |
| `Config.Television.requireUtilities` | `true`                             | Screens need power and internet when bills are on.                                                      |
| `Config.Television.maxPlaying`       | `2`                                | Screens playing at once per property.                                                                   |
| `Config.Television.allowCustomUrl`   | `true`                             | Players open any link. Twitch links are always refused.                                                 |
| `Config.Television.allowFullPage`    | `true`                             | Loads web pages directly. Turn it off if untrusted players can reach a TV.                              |
| `Config.Television.interactive`      | `false`                            | Adds a browser window players type and click in.                                                        |
| `Config.Television.allowedHosts`     | `{}`                               | Hosts players may open; `{}` allows any.                                                                |
| `Config.Television.channels`         | empty                              | Preset channels: a video file, HLS stream, YouTube link or web page.                                    |

## Water, seats and exercise

`Config.WaterUse` sets the animation, effect and duration of the shower (10 seconds), sink (5 seconds) and bathtub (10 seconds). `Config.UsableFurniture` sets how players sit, lie, do yoga, bench, do pull-ups, lift weights, drink and pole dance: the animation or scenario, where the ped is anchored and how many seats a wide piece has. Turn it off with `enable = false`.

## Mortgage and contracts

| Option                                                                             | Default      | What it does                                                          |
| ---------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------- |
| `Config.Mortgage.enabled`                                                          | `true`       | Pay part now and the rest over time. A listing can set its own terms. |
| `Config.Mortgage.paymentMode`                                                      | `'manual'`   | `'automatic'` takes payments from the bank.                           |
| `Config.Mortgage.onNonPayment`                                                     | `'lock'`     | `'lock'` or `'repossess'`.                                            |
| `Config.Mortgage.downPaymentPercent`                                               | `20`         | Percent paid right away.                                              |
| `Config.Mortgage.term`, `interval`                                                 | `24`, 1 week | Number of payments and time between them.                             |
| `Config.Mortgage.interestRate`                                                     | `5`          | Percent interest added to the loan.                                   |
| `Config.Mortgage.gracePeriod`                                                      | `3`          | Missed payments before `onNonPayment`.                                |
| `Config.Mortgage.allowManualPayment`                                               | `true`       | Manual payments also in automatic mode.                               |
| `Config.Mortgage.earlyPayoffInterestWaiver`                                        | `50`         | Percent of the remaining interest skipped on early payoff.            |
| `Config.Contracts.enable`                                                          | `false`      | Players sign a contract before a deal. A realtor sale always has one. |
| `Config.Contracts.purchase`, `rent`, `finance`, `sellBack`, `transfer`, `business` | `true`       | Deals that need a contract when contracts are on. `motel` is `false`. |
| `Config.Contracts.timeout`                                                         | `120`        | Seconds to sign.                                                      |

## Starter housing

`Config.StarterHousing` gives new characters an apartment in one shared building. Set real building values before you turn it on.

| Option                             | Default                             | What it does                                                                                                                                  |
| ---------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled`                          | `false`                             | Starter apartments on or off.                                                                                                                 |
| `grantMode`                        | `'free'`                            | `'free'`, `'price'`, `'rent'` or `'mortgage'` (with `mortgageTerms`).                                                                         |
| `chargePlayer`                     | `false`                             | Price mode: takes `building.price`, or gives it free if the player cannot pay.                                                                |
| `eligibility.onlyNewCharacters`    | `true`                              | Only brand-new characters qualify. ESX only.                                                                                                  |
| `eligibility.onlyIfNoProperty`     | `false`                             | Skips players who own a property.                                                                                                             |
| `eligibility.oneTimePerIdentifier` | `true`                              | One starter apartment per character.                                                                                                          |
| `eligibility.jobs`, `groups`       | `nil`                               | Allowed jobs or groups; `nil` allows any.                                                                                                     |
| `ensureBuildingOnStart`            | `false`                             | Creates the building when the resource starts.                                                                                                |
| `building`                         | Starter Apartments, Alta Street 305 | `entranceCoords`, `houseInterior` (`'k4_v16low1_shell'`), `garageInterior`, `name`, `address`, `image`, `price` (`25000`) and `rent` (`500`). |

## Security

Rows without a prefix are in `Config.Security`.

| Option                                 | Default                               | What it does                                                                                                     |
| -------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `Config.Security.enable`               | `true`                                | Alarms, door camera and reinforced locks.                                                                        |
| `Config.Security.requireUtilities`     | `true`                                | Alarms and camera need power and internet when bills are on.                                                     |
| `alarms.alertStyle`                    | `'banner'`                            | `'banner'`, `'notify'` or `'both'`.                                                                              |
| `alarms.audibleRange`, `sirenDuration` | `25.0`, 20 seconds                    | Siren range and length.                                                                                          |
| `alarms.tiers`                         | 4 tiers                               | Door alarm 2500 (lockpick), Home alarm 6000 (+ entry), Full alarm 12000 (+ raid), Vault alarm 18000 (+ storage). |
| `alarms.dispatch`                      | off, `9000`                           | Add-on that reports break-ins through `ReportBreakIn`.                                                           |
| `camera.enable`, `price`               | `true`, `8000`                        | Front-door camera.                                                                                               |
| `camera.viewAccess`                    | `'all'`                               | `'menu'`, `'item'`, `'command'` or `'all'`.                                                                      |
| `camera.item`, `command`               | `'security_tablet'`, `'frontdoorcam'` | Item and command that open the feed.                                                                             |
| `camera.remote`                        | `true`                                | Lists every property whose camera you can view; `false` only the one you are in.                                 |
| `lock.tiers`                           | 3000, 7500, 15000                     | Reinforced, Deadbolt and High-security locks. Each grade adds a lockpicking pin.                                 |

## IPL customization

Options are in `Config.IPLCustomization`.

| Option                   | Default         | What it does                                                   |
| ------------------------ | --------------- | -------------------------------------------------------------- |
| `enable`                 | `true`          | Owners restyle IPL interiors that have a `customization` list. |
| `charge`, `freeForOwner` | `true`, `false` | Whether changes cost money, and whether the owner pays.        |
| `defaultPrice`           | `1000`          | Price per changed group without its own price.                 |
| `account`                | `'bank'`        | Account charged.                                               |

## Real estate business

`Config.RealEstateBusiness` adds realtor businesses with their own grades, employees and money, separate from framework jobs.

| Option                    | Default                                                       | What it does                                                                                                                                                                               |
| ------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enabled`                 | `true`                                                        | Businesses on or off.                                                                                                                                                                      |
| `menuCommand`, `menuItem` | `'realestate'`, `''`                                          | Command and item that open the business menu.                                                                                                                                              |
| `requireDuty`             | `false`                                                       | Members must be on duty to create or sell properties and to use the office stash and wardrobe.                                                                                             |
| `adminCreator`            | `true`                                                        | Admins create and edit businesses in the admin panel.                                                                                                                                      |
| `selfPurchase`            | off, `250000`                                                 | Players found their own business.                                                                                                                                                          |
| `salary`                  | on, every 30 minutes, online only                             | Grade salaries paid from the business balance.                                                                                                                                             |
| `caps`                    | 10 grades, salary 5000, 20 employees, 30 % commission         | Limits a boss cannot go over.                                                                                                                                                              |
| `saleChannels`            | `'contract'`                                                  | `'instant'` (buy at the door), `'contract'` or `'both'`.                                                                                                                                   |
| `acquisition.mode`        | `'purchase'`                                                  | `'purchase'` buys unowned properties to resell; `'create'` builds stock with the property creator; `'both'`. Business members can run `/addproperty` only with `'create'` or `'both'`.     |
| `acquisition.purchase`    | 100 %, `'burn'`, players can buy unowned                      | Price businesses pay, where the money goes, and whether only businesses buy unowned properties.                                                                                            |
| `acquisition.creation`    | free, not owned                                               | Price per created unit, per shell prices, and whether the business owns what it creates.                                                                                                   |
| `ownedProperties`         | furnish and storage on, transfer `'owner'`                    | What members with `sellProperty` do in business properties.                                                                                                                                |
| `office`                  | blip 475, stash 50 slots / 100000                             | Office blip, stash, wardrobe and boss menu, placed in game.                                                                                                                                |
| `revenue`                 | first sale 70 % business, 5 % realtor; resale 10 % commission | How income from a business's properties is split.                                                                                                                                          |
| `defaultGrades`           | Trainee, Realtor, Manager, Boss                               | Starting grades with salaries 250 to 1000 and permission flags: `createProperty`, `buyProperty`, `sellProperty`, `manageEmployees`, `manageGrades`, `deposit`, `withdraw`, `editBusiness`. |
| `businesses`              | empty                                                         | Businesses added once on startup by `name`.                                                                                                                                                |

## Interiors

`config/interiors.lua` holds `Config.GarageInteriors` (small, medium, high-end and large garages, plus IPL garages) and `Config.HouseInteriors` (K4MB1 shells and IPL interiors). A shell spawns `Config.ShellOffset`, `vec3(0.0, 0.0, 500.0)`, above its front door. The shell editor adds entries here.

| Field                         | What it does                                                                                                                                                                                            |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`                       | Shell model. IPL and MLO interiors set `isIpl = true` instead.                                                                                                                                          |
| `label`                       | Name in menus.                                                                                                                                                                                          |
| `exits`                       | `{label, coords}` exit points; `coords` is an offset from the shell, or world coords for an IPL. An exit with `elevator = true` is also an elevator stop.                                               |
| `spots`                       | Fixed storage, wardrobe, mirror, water, cooking, switch, music, generator, battery and assistant spots. Add new ones at the end and never reorder them; replace a removed spot with `{removed = true}`. |
| `floors`                      | Elevator stops, at most 8.                                                                                                                                                                              |
| `customization`               | IPL style groups (`'choice'`, `'toggle'` or `'color'`) with options and prices.                                                                                                                         |
| `maxStorages`, `maxFurniture` | Overrides the furnishing limits for this interior.                                                                                                                                                      |

## Premade properties

`config/properties.lua` registers properties on start when `Config.UsePremadeProperties = true` (default `false`). Each entry in `Config.Properties` has `name` and `coords`, plus optional `houseInteriorIndex` and `price`; missing values are random. Edit them in game afterwards with the property editor.

## Furniture catalog

`config/furniture.lua` holds `Config.Furniture`, more than 3800 pieces in 25 categories. Each entry is `{price, label, model}` plus optional fields:

| Field                                             | What it does                                                                                                                                                     |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `uses`                                            | What the prop does, one or more `Config.FurnitureUses` kinds: `{'sit', 'storage'}` is a seat with storage.                                                       |
| `weight`, `slots`                                 | Stash size of a storage prop.                                                                                                                                    |
| `temperature`                                     | `'heat'` or `'cool'`.                                                                                                                                            |
| `power`                                           | `'fridge'`, `'computer'` or `'appliance'`, added to the power bill.                                                                                              |
| `exclusive`                                       | `true` keeps the piece out of the shop; players get it only from [giveFurniture](https://tk-scripts.gitbook.io/docs/tk_housing/exports/server.md#givefurniture). |
| `minBuild`                                        | Hides the prop from players on an older game build.                                                                                                              |
| `light`, `speaker`, `tv`, `frame`                 | Makes the prop a lamp, speaker, screen or picture frame.                                                                                                         |
| `bounds`, `useAnchor`, `waterUse`, `interactions` | Fixes for a wrong bounding box, seat position, water effect, and extra target options.                                                                           |

## Shell creator

`config/shell_creator.lua` holds the building pieces in `Config.ShellCreatorProps`, plus these settings. Rows without a prefix are in `Config.ShellBuild`.

| Option                             | Default                        | What it does                                                                                                                |
| ---------------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `Config.ShellBuild.agents`         | `'none'`                       | Who uses `/shellcreator` besides admins: `'job'`, `'business'`, `'both'` or `'none'`.                                       |
| `gridSize`                         | `2.0`                          | Grid cell size; every piece is scaled to one cell.                                                                          |
| `rotationStep`, `fineRotationStep` | `90.0`, `15.0`                 | Rotation steps for grid pieces and free pieces.                                                                             |
| `wallHeight`, `levelHeight`        | `3.0`, `3.0`                   | Used when the wall model cannot be measured. Keep them equal.                                                               |
| `buildOrigin`                      | `vec3(1000.0, 1000.0, -150.0)` | Hidden build area below the map.                                                                                            |
| `routingBucket`                    | `5000000`                      | First routing bucket for builders, kept clear of property IDs.                                                              |
| `maxBuilders`, `maxObjects`        | `8`, `900`                     | Builders at once, and pieces per shell.                                                                                     |
| `maxExits`, `maxFloors`            | `12`, `8`                      | Exits and elevator floors per shell.                                                                                        |
| `photo.autoBake`                   | `true`                         | Missing shell photos are taken behind a loading screen and shared.                                                          |
| `Config.ShellPaint.enable`         | `true`                         | Wall and floor paint for custom shells, saved per property. `tints` and the `walls` and `floors` palettes list the choices. |

## Server-only settings

| Option                     | Default | What it does                                                                                                                           |
| -------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `ConfigSV.FivemanageToken` | `''`    | Token for in-game photos. See [Set up property photos](https://tk-scripts.gitbook.io/docs/tk_housing/setup.md#set-up-property-photos). |
| `ConfigSV.WebhookLink`     | `''`    | Discord webhook for housing logs.                                                                                                      |

## Editable functions

| File                                                 | Function                                                                                                       | When it runs                                                  | What to put there                                                                     |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `client/main_editable.lua`                           | `Notify`, `ShowTextUI`, `HideTextUI`, `DoProgress`                                                             | The client shows a notification, prompt or progress bar.      | Another UI system.                                                                    |
| `client/main_editable.lua`                           | `AddBoxZone`, `AddModelZone` and the other target wrappers                                                     | Zones are added with `Config.Target` set.                     | Another target script.                                                                |
| `client/main_editable.lua`                           | `OpenWardrobe`, `OpenAppearance`                                                                               | A wardrobe or mirror is used.                                 | A clothing script not in `Config.Clothing`.                                           |
| `client/main_editable.lua`                           | `OpenStash`                                                                                                    | A storage opens.                                              | Another inventory.                                                                    |
| `client/main_editable.lua`                           | `OpenGarageMenu`                                                                                               | A property garage opens with `Config.Garage.menu = 'custom'`. | Your garage script.                                                                   |
| `client/main_editable.lua`                           | `SetWeatherSync(enable)`                                                                                       | A player enters or leaves a property.                         | Your weather script with `Config.Weather = 'custom'`.                                 |
| `client/main_editable.lua`                           | `RunLockpickMinigame`, `RunBreachMinigame`                                                                     | A door or storage is lockpicked or breached.                  | Your minigame; return true or false.                                                  |
| `client/main_editable.lua`                           | `GetVehicleFuel`, `SetVehicleFuel`                                                                             | A vehicle is stored or taken out.                             | Your fuel script. LegacyFuel works without changes.                                   |
| `client/main_editable.lua`                           | `CanPurchaseProperty`, `CanEnterProperty`, `CanLockpick`, `CanStoreVehicle`                                    | Before those actions.                                         | Your own rules; return false to block.                                                |
| `client/main_editable.lua`                           | `EnteringHouse`, `LeavingHouse`, `EnteringGarage`, `LeavingGarage`, `TogglePhotoMode`, cooking and water hooks | The action happens.                                           | Your own code, for example hiding the HUD.                                            |
| `server/main_editable.lua`                           | `ReportBreakIn(propertyId, alarmType, coords, name)`                                                           | An alarm with the dispatch add-on goes off.                   | A dispatch script not in `Config.Dispatch`.                                           |
| `server/main_editable.lua`                           | `PurchaseProperty`, `PayBill`, `PayRent`                                                                       | A player buys, pays a bill or pays rent.                      | Another money system; return true when paid.                                          |
| `server/main_editable.lua`                           | `PropertyCreated`, `SoldProperty`, `PurchasedFurniture`, `BusinessTransaction`                                 | After those actions.                                          | Logs or your own code.                                                                |
| `server/main_editable.lua`                           | `CanTransferProperty`                                                                                          | Before a transfer.                                            | Your own rules.                                                                       |
| `server/main_editable.lua`                           | `GiveVehicleKey(playerId, plate, vehicle)`                                                                     | A vehicle leaves a property garage.                           | Your key script. zyke\_vehiclekeys, qbx\_vehiclekeys and qb-vehiclekeys are detected. |
| `server/main_editable.lua`                           | `GetVehicleOwner`, `SetVehicleStored`, `SetVehiclePersistent`                                                  | Garage vehicles are stored or taken out.                      | Changes for your garage tables or script.                                             |
| `server/main_editable.lua`                           | `CanPutItemInStorage`, `CanTakeItemFromStorage` and the business stash versions                                | An item moves in or out.                                      | Your own rules.                                                                       |
| `server/main_editable.lua`                           | `RegisterStash`, `StashHasItems`, `GetPlayerInventory`, `GiveWeapon`                                           | Stashes are made or read.                                     | Another inventory.                                                                    |
| `server/main_editable.lua`                           | `UploadPhoto(dataUrl, filename, cb)`                                                                           | A photo is taken in game.                                     | Another image host; call `cb` with the https link.                                    |
| `server/main_editable.lua`                           | `GetOutdoorTemperature(propertyId, area)`                                                                      | With `Config.Temperature.outdoor.source = 'custom'`.          | Your weather script's temperature in °C.                                              |
| `client/frameworks/*.lua`, `server/frameworks/*.lua` | Framework functions                                                                                            | Always.                                                       | Changes for a custom framework.                                                       |
