> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_housing/installation.md).

# Installation

Follow these steps to install `rcore_housing` for the first time.

## 📋 Prerequisites

Before installing, make sure your server has:

| Requirement              | Notes                                                                              |
| ------------------------ | ---------------------------------------------------------------------------------- |
| Artifact `5104` or newer | Older artifacts can break the resource.                                            |
| OneSync                  | Required for property instances and synced entities.                               |
| Database                 | `oxmysql`                                                                          |
| Framework                | ESX, QBCore, QBox                                                                  |
| Inventory                | Needed for `property_key`, `lockpick`, `battering_ram`, and any storage furniture. |

## 🛠️ First Time Installation

{% stepper %}
{% step %}

### Download the resource

Download `rcore_housing` from the [CFX Portal](https://portal.cfx.re/assets/).
{% endstep %}

{% step %}

### Move the folder

Move the folder into your server 📁`resources` folder.

```
📁 server
└── 📁 resources
    ├── 📁 [housing]
    │   └── 📁 rcore_housing
    └── 📁 (other resources)
```

{% hint style="warning" %}
**Do not** place shell or MLO resources inside the `[housing]` folder. Shells must be kept in their own folder and ensured **before** `rcore_housing` — see the [Shells step](#ensure-shells-before-rcore_housing) below.
{% endhint %}
{% endstep %}

{% step %}

### Add inventory items

{% tabs %}
{% tab title="ESX" %}
Items auto-deploy on script start - no action needed.
{% endtab %}

{% tab title="ox\_inventory / qb-inventory / qs-inventory" %}
Copy the items from `rcore_housing/assets/inventory/` into your inventory resource.

Copy item images from `rcore_housing/assets/inventory/inventory_images/` into your inventory's image folder (e.g. `ox_inventory/web/images/`).
{% endtab %}
{% endtabs %}

See the [inventory integration](/paid-resources/rcore_housing/integrations/inventory.md) page for the per-inventory item definitions.
{% endstep %}

{% step %}

### Configure the real-estate job

{% tabs %}
{% tab title="ESX" %}
The `realestate` job is auto-defined on first boot - no action needed.
{% endtab %}

{% tab title="QBCore / QBox" %}
Copy the job from `rcore_housing/assets/jobs/jobs.lua` into your shared jobs config (e.g. `qb-core/shared/jobs.lua` or `qbx_core/shared/jobs.lua`):

```lua
['realestate'] = {
    label = 'Real Estate',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = { name = 'trainee',    label = 'Trainee Agent',   payment = 100 },
        ['1'] = { name = 'agent',      label = 'Sales Agent',     payment = 150 },
        ['2'] = { name = 'senior',     label = 'Senior Agent',    payment = 200 },
        ['3'] = { name = 'supervisor', label = 'Sales Supervisor',payment = 250 },
        ['4'] = { name = 'manager',    label = 'Office Manager',  payment = 300 },
        ['5'] = { name = 'director',   label = 'Director',        payment = 400 },
    },
},
```

{% endtab %}
{% endtabs %}

The job name (`realestate`) and grade `5` (`director`) are the defaults used by the real-estate business module. Rename them in `config.lua` if you change the job here.
{% endstep %}

{% step %}

### Enable dynamic door creation

`rcore_housing` creates property doors at runtime. Add this convar to your `server.cfg`:

```cfg
setr game_enableDynamicDoorCreation "true"
```

Without it, doors on dynamically spawned interiors will not be interactable.
{% endstep %}

{% step %}

### Install and ensure your shells

{% hint style="warning" %}
**`rcore_housing` does not include any shell resources.** The script only contains pre-made interior offsets and configurations for supported shells — the actual shell models (3D interiors) are **separate resources** that you must download and install yourself.
{% endhint %}

`rcore_housing` comes with built-in support for [K4MB1 shells](https://k4mb1maps.com/product/5015840), but the shell resource itself is not part of the package. Think of it this way: `rcore_housing` knows *how* to use the shells, but it does not *contain* them.

**Two important rules:**

1. Shell resources must start **before** `rcore_housing` — otherwise the script won't find the shell models when it loads.
2. **Do not** put shell resources inside the `[housing]` folder — keep them in their own separate folder.

Here is how your `server.cfg` and folder structure should look using K4MB1 shells as an example:

```
📁 resources
├── 📁 [shells]
│   └── 📁 K4MB1-StarterPack       ← your shell resource (NOT inside [housing])
├── 📁 [housing]
│   └── 📁 rcore_housing
└── 📁 (other resources)
```

```cfg
# server.cfg — ensure order matters!

ensure [framework]
ensure [database]
ensure [inventory]

# Shells MUST come before housing
ensure K4MB1-StarterPack

# Housing comes after shells are loaded
ensure [housing]
```

{% hint style="danger" %}
If `rcore_housing` starts before your shell resource, interiors will fail to load and players will fall through the map. Always ensure shells first.
{% endhint %}

See the [Shells & IPLs](/paid-resources/rcore_housing/integrations/shells.md) page for the full list of supported shells and how to register custom ones via the in-game Interior Creator.
{% endstep %}

{% step %}

### Ensure the resource

Add `rcore_housing` to your `server.cfg` **after** your framework, database, inventory, target, dispatch, and shell resources:

```cfg
ensure [framework]
ensure [database]
ensure [inventory]


ensure [housing]
```

{% endstep %}

{% step %}

### Start the server

Start the server once. `rcore_housing` creates all of its database tables automatically on first boot and seeds the default SHELL and IPL interior catalog.

Join the server and run `/housing` in-game to open the property manager.
{% endstep %}

{% step %}

### Seed prepared properties *(optional)*

To populate the map with a set of ready-made properties, run the following command in the server console:

```
rcore_housing_seed_houses
```

This creates the bundled prepared properties so you have something to work with right away.

{% hint style="info" %}
Once the command finishes, restart the script and enjoy your predefined properties.
{% endhint %}
{% endstep %}
{% endstepper %}

## 🗄️ Database

`rcore_housing` creates its own database tables automatically on startup. You do not need to import an SQL file manually.

See the [database integration](/paid-resources/rcore_housing/integrations/database.md) page for the full table list.

## 📸 Photo service *(optional but recommended)*

Used for furniture previews, marketplace listings, and custom uploads. Without it, metadata still saves - just no images.

{% stepper %}
{% step %}

### Create an API key

Sign in at [fivemanage.com](https://fivemanage.com) via Discord and create an API key.
{% endstep %}

{% step %}

### Configure the service

Open `sconfig.lua` and set:

```lua
ServerConfig = {
    Photos = {
        Service = PhotoStorageType.FIVEMANAGE, -- or FIVEMERR
        ApiKey  = "<paste your key here>",
    },
}
```

{% endstep %}

{% step %}

### Restart the resource

The "photo-disabled" warning in the admin panel disappears once the key is active.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Leave `Service = PhotoStorageType.NONE` to keep photos off.
{% endhint %}

## 🏠 Custom shells *(optional)*

Ships with built-in [K4MB1 shells](https://k4mb1maps.com/product/5015840) and pre-made offsets ready to use. Any other shell or IPL can be registered in-game as admin via `/housing` → **Interior Creator** - no config file editing required.

See the [shells & IPLs integration](/paid-resources/rcore_housing/integrations/shells.md) page for the full built-in list and creator walkthrough.
