# Installation

This installation guide covers both <mark style="color:red;">ESX</mark> and <mark style="color:blue;">QBCore</mark> frameworks.

<table><thead><tr><th width="202">Resource</th><th>Source</th></tr></thead><tbody><tr><td>ox_lib</td><td><a href="https://github.com/overextended/ox_lib/releases/download/v3.20.0/ox_lib.zip">Download</a></td></tr><tr><td>bob74_ipl</td><td><a href="https://github.com/Bob74/bob74_ipl">Download</a></td></tr><tr><td>xsound</td><td><a href="https://github.com/Xogy/xsound">Download</a></td></tr><tr><td>screenshot-basic</td><td><a href="https://github.com/citizenfx/screenshot-basic">Download</a></td></tr><tr><td>0r_lib</td><td>You can find it on your keymaster account. <mark style="color:red;">(It is delivered as Escrow.)</mark></td></tr><tr><td>qua-garagehouse</td><td>You can find it on your keymaster account. <mark style="color:red;">(It is delivered as Escrow.)</mark></td></tr><tr><td>qua-house</td><td>You can find it on your keymaster account. <mark style="color:red;">(It is delivered as Escrow.)</mark></td></tr><tr><td><strong>qua-nmotel</strong></td><td>You can find it on your keymaster account. <mark style="color:red;">(It is delivered as Escrow.)</mark></td></tr></tbody></table>

### Target System

The system can work with <mark style="color:blue;">**ox\_target**</mark> and <mark style="color:red;">**qb-target**</mark> plugins. Or you can integrate it by making arrangements yourself.

### Supported Inventories

* qb-inventory
* qs-inventory
* ox\_inventory
* ps-inventory
* lj-inventory
* origen\_inventory
* ls-inventory
* core-inventory
* codem-inventory

## SQL For House Script

It has an automatic SQL installation system. You don't have to do anything.

## Setup For Inventories

{% tabs %}
{% tab title="ox\_inventory" %}
Open the <mark style="color:blue;">**ox\_inventory/data/items.lua**</mark> file. And place the following code.

<pre class="language-lua"><code class="lang-lua">['housekey'] = {
	label = 'House Key',
	weight = 200,
	stack = false,
	consume = 0,
	unique = true,
	close = true,
	description = 'Housekey',
	client = {
	    export = '0r_houses.useHouseKey'
	},
	image = 'housekey.png'
},

<strong>['houselockpick'] = {
</strong>	label = 'House Lockpick',
	weight = 200,
	stack = false
},
</code></pre>

{% endtab %}

{% tab title="qs-inventory, ls-inventory, lj-inventory, qb-inventory, ps-inventory" %}
The best thing about these inventories is that their infrastructure is qb-inventory. That's why the installations are the same.

Place these items in items.lua in your inventories. (qb-inventory to qb-core/shared/items.lua)

<pre class="language-lua"><code class="lang-lua"><strong>housekey = { name = 'housekey', label = 'House Keys', weight = 1000, type = 'item', image = 'housekeys.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Default House Key' },
</strong>houselockpick = { name = 'houselockpick', label = 'House Lock Pick', weight = 1000, type = 'item', image = 'lockpick.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Lockpick for House' },
</code></pre>

Open your inventory javascript file. And search for the <mark style="color:blue;">**FormatItemInfo**</mark> function and place this code in the if loop within that function. There should be a <mark style="color:blue;">**metadata.js**</mark> file in <mark style="color:blue;">**qs-inventory**</mark>, do the same process there.

```javascript
} else if (itemData.name == "housekey") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>House: </strong><span>" +
        itemData.info.HouseName +
        "</span></p><p><strong>Address: </strong><span>" +
        itemData.info.Address
);
```

**For New qb-inventory**

```javascript
case "housekey":
    return `<p><strong>House: </strong><span>${itemData.info.HouseName}</span></p>
    <p><strong>Address: </strong><span>${itemData.info.Address}</span></p>`;
```

{% endtab %}

{% tab title="codem-inventory" %}
Add this code to the if condition in the codem-inventory/config/metadata.js file located in the inventory.

```javascript
} else if (item.name.match("housekey")) {
    let infoData = [
        { label: "House Key: ", value: iteminfo.HouseName },
        { label: "Address:", value: iteminfo.Address },
    ]
    returnString = infoData;
```

{% endtab %}

{% tab title="tgiann-inventory" %}
Find the metadata.js file and add this code to the item list in the qbItemInfo function.

```javascript
} else if (itemData.name == "housekey") {
    html = `
      <div class="item_info_container">
        <div class="item_info_row">
          <div class="item_info_row_left">First Name: </div>
          <div class="item_info_row_right">${itemData.info.HouseName}</div>
        </div>
        <div class="item_info_row">
          <div class="item_info_row_left">Last Name: </div>
          <div class="item_info_row_right">${itemData.info.Address}</div>
        </div>`;
```

{% endtab %}
{% endtabs %}

## Other Supported House Maps

Apart from the maps that come with the purchase of 0R House, house maps are available. House maps provided by Household Studios and compatible with the house system:

| Resource                             |                                                                                                           | Require |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------- | ------- |
| Hane Mirrorpark House                | <https://forum.cfx.re/t/free-prop-classic-coffee-table-wide-dont-miss-41-houses-with-40-discount/5226398> | ox\_lib |
| Hane Vespucci Houses (Not Ready Yet) | <https://forum.cfx.re/t/mlo-vespucci-6-villas-pack/4747944>                                               | ox\_lib |

{% hint style="warning" %}
These maps belong to Hane Studios. If you have any problems you should contact them.
{% endhint %}

## Server.cfg

{% tabs %}
{% tab title="ESX" %}

```
start es_extended
start 0r_lib
start 0r_houses

## If You Are Using Other Maps ##
start hn_expansion_41_houses
start hane_mirrorpark_data
--- esx resources --
```

{% endtab %}

{% tab title="QBCore" %}

```
start qb-core
start 0r_lib
start 0r_houses

## If You Are Using Other Maps ##
start hn_expansion_41_houses
start hane_mirrorpark_data
--- qbcore resources --
```

{% endtab %}
{% endtabs %}

The server.cfg initialization order should be as follows.
