> For the complete documentation index, see [llms.txt](https://cylexdev.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://cylexdev.gitbook.io/docs/scripts/cylex-modern-housing/introduction.md).

# Introduction

Cylex Modern Housing is a shell housing system for FiveM. Real estate agents create houses with gardens in the game; players buy, furnish, share and park at them. For QBCore, ESX, bs-core and mCore.

<div data-full-width="true"><figure><img src="https://2441530673-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtxqtJ91rcI0EHH3xURdT%2Fuploads%2Ff2XTUWDRhFNgWmRgF2Yx%2Fcylex-modern-housing.png?alt=media" alt="Cylex Modern Housing"><figcaption></figcaption></figure></div>

Cylex Modern Housing (`cylex_housing`) is the housing system for your FiveM server.\
Real estate agents and admins create houses in the game: they draw the garden, place the door and choose an interior (a shell). Players buy a house at its door, furnish it inside and in the garden, keep items and outfits there, park their vehicles and give keys to friends.\
It runs on QBCore, ESX, bs-core or mCore, and leaves its settings, language, shell and furniture files open to edit.

### Key Features <a href="#key-features" id="key-features"></a>

* House creation in the game with a free camera: draw the garden area, place the door, pick the shell and the exit point. No coordinates to copy.
* A buy menu with photos and bedroom, bathroom and garage counts, and a 60-second look inside before buying.
* Decoration mode inside the house and in the garden: place, move and turn furniture with a gizmo. Furniture is bought, and sold back for part of its price.
* A furniture catalogue with 13 categories, plus ready lists for Pata, Cylex (neon, osaka, uwu), Killstore, Lunatic Studio, Murm and NPAS prop packs. Furniture and shells whose models are not on your server are hidden by themselves.
* Ready shell lists for the included default shell pack, K4MB1, Neox (cylex\_shellpack), DC custom shells and Quasar shells.
* Keys for friends with a separate furniture permission, and 30-second invites for visitors.
* A stash in every house, sized by its shell, for qb-inventory, ox\_inventory, qs-inventory, mf-inventory, chezza\_inventory and mInventory.
* A wardrobe point that opens the outfit menu of 10 clothing scripts.
* House garages: players park their own vehicles at the house and take them out again.
* Lights you can switch on and off and colour, and security cameras you can watch from the management menu.
* Building props: place the included house, garage and island models in the world.
* Owners sell a house back for a share of its price, and the job that created the house gets a share of every sale.
* Discord logs for buying, creating, deleting and selling houses, and for adding and removing garages.
* English and Turkish.

### Installation Steps <a href="#installation-steps" id="installation-steps"></a>

{% content-ref url="/pages/W5iMasNOTkkhJhwDfSye" %}
[Installation & Configuration](/docs/scripts/cylex-modern-housing/installation-and-configuration.md)
{% endcontent-ref %}

{% content-ref url="/pages/SM1LbUFL5HoJ3MIfiegY" %}
[Admin Commands](/docs/scripts/cylex-modern-housing/admin-commands.md)
{% endcontent-ref %}

### Help and Developer Pages <a href="#help-and-developer-pages" id="help-and-developer-pages"></a>

{% content-ref url="/pages/elHeNC6pPvFsBB5U6FVB" %}
[Frequently Asked Questions](/docs/scripts/cylex-modern-housing/frequently-asked-questions.md)
{% endcontent-ref %}

{% content-ref url="/pages/jfFxlTVa0LqLfHQbdNaN" %}
[Troubleshooting Common Issues](/docs/scripts/cylex-modern-housing/troubleshooting-common-issues.md)
{% endcontent-ref %}

{% content-ref url="/pages/IhhcIySpqKPwKXPAjL2l" %}
[Exports](/docs/scripts/cylex-modern-housing/exports.md)
{% endcontent-ref %}

{% content-ref url="/pages/WICXUTHKk8YkiU7HaEge" %}
[Events](/docs/scripts/cylex-modern-housing/events.md)
{% endcontent-ref %}

### Dependencies <a href="#dependencies" id="dependencies"></a>

| Dependency                        | Required           | Notes                                                                                                                                                                                  |
| --------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ox\_lib                           | **Yes**            | The script loads it at start, so it must start before the script.                                                                                                                      |
| QBCore, ESX, bs-core **or** mCore | **Yes**            | Set in `core/coreConfig.lua`. There is no automatic detection.                                                                                                                         |
| oxmysql                           | **Yes**            | Used for character names on ESX and for the owned-vehicle check of the garage. The houses themselves are saved in JSON files.                                                          |
| cylex\_menu                       | **Yes** (included) | The menu of the real estate job menu.                                                                                                                                                  |
| cylex\_default\_shellpack         | **Yes** (included) | The default interiors. You can use other shell packs as well.                                                                                                                          |
| cylex\_houseprops                 | Included           | Building models for **Create House Prop**.                                                                                                                                             |
| An inventory script               | For stashes        | qb-inventory, ox\_inventory, qs-inventory, mf-inventory, chezza\_inventory or mInventory (`Config.Inventory`).                                                                         |
| A clothing script                 | For wardrobes      | fivem-appearance, illenium-appearance, bs-appearance, qb-clothing, ak47\_clothing, vms\_clothestore, renzu\_clothes, rcore\_clothes, cc or 17mov\_CharacterSystem (`Config.Clothing`). |
| qb-management                     | Optional           | Receives the creator job's share of a sale by default (`Config.BossMenuFunction`).                                                                                                     |
| qb-weathersync                    | Optional           | Turned off while a player is inside a house, and on again when the player leaves.                                                                                                      |

{% hint style="warning" %}
Your server's license key (the `sv_licenseKey` line in server.cfg) must belong to the same Cfx.re account that bought the script. Otherwise the protected files do not load.
{% endhint %}

### What You Can Edit <a href="#what-you-can-edit" id="what-you-can-edit"></a>

All settings, texts, shell and furniture lists are open. The escrow protection only covers the internal client and server logic.

| File / Folder                                                            | Editable?                                                                         |
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| `shared/config.lua`                                                      | Yes — main settings, shells, furniture, stash, wardrobe and garage functions      |
| `shared/server_config.lua`                                               | Yes — Discord webhooks                                                            |
| `shared/commands.lua`                                                    | Yes — commands, keys and the job menu                                             |
| `shared/shells/*.lua`, `shared/furnitures/*.lua`                         | Yes — shell and furniture packs                                                   |
| `core/coreConfig.lua`, `core/serverCore.lua`                             | Yes — framework choice and the server framework bridge                            |
| `client/freecam/config.lua`                                              | Yes — free camera controls and speed                                              |
| `locales/*.lua`                                                          | Yes — every text players see                                                      |
| `server/data/houses.json`, `server/data/houseProps.json`                 | Your data — all houses and building props. Edit only while the server is stopped. |
| `core/clientCore.lua` and all other Lua files in `client/` and `server/` | No — escrow-protected                                                             |
| `html/`                                                                  | No — the built menus                                                              |

### Support <a href="#support" id="support"></a>

Store: <https://cylexdev.com>\
Discord: <https://discord.gg/cylexstore>
