> For the complete documentation index, see [llms.txt](https://fivecode.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://fivecode.gitbook.io/docs/scripts/fivecode-carkeys/installation-guide.md).

# Installation Guide

Follow these steps for flawless instalation:

1. Download the script from your [cfx portal](https://portal.cfx.re/login).<br>
2. Place the script into your server resource folder:\
   *`FXServer\server-data\resources\fivecode_carkeys`*<br>
3. Write the script into your server.cfg:\
   *`ensure fivecode_carkeys`*<br>
4. Setup your inventory - o&#x78;**,** qb, qs, aq:

<details>

<summary><strong>ox</strong></summary>

Add the following into:\
*`ox_inventory\modules\items\client.lua`*

```lua
['vehiclekeys'] = {
    label = 'Vehicle Keys',
    weight = 10,
    stack = false,
    close = true,
},
```

</details>

<details>

<summary><strong>qb</strong></summary>

Add the following into:\
*`qb-core\shared\items.lua`*

```lua
['vehiclekeys'] = {
	['name'] = 'vehiclekeys',
	['label'] = 'Vehicle Keys',
	['weight'] = 50,
	['type'] = 'item',
	['image'] = 'vehiclekeys.png',
	['unique'] = true,
	['useable'] = true,
	['shouldClose'] = true,
	['combinable'] = nil,
	['description'] = 'Advanced Vehicle Keys',
},
```

and this into:\
*`qb-inventory/html/js/app.js`*

<pre class="language-lua"><code class="lang-lua"><strong>New:
</strong>else if (itemData.name == "vehiclekeys") {
    return `
        &#x3C;p>&#x3C;strong>${itemData.info.label}&#x3C;/strong>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Model: &#x3C;/strong>&#x3C;span>${itemData.info.model}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Plate: &#x3C;/strong>&#x3C;span>${itemData.info.plate}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>VIN: &#x3C;/strong>&#x3C;span>${itemData.info.vin}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Security key: &#x3C;/strong>&#x3C;span>${itemData.info.key}&#x3C;/span>&#x3C;/p>
    `;
}


<strong>Old:
</strong>else if (itemData.name == "vehiclekeys") {
        $(".item-info-title").html("&#x3C;p>" + itemData.info.label + "&#x3C;/p>");
        $(".item-info-description").html(
                "&#x3C;p>&#x3C;strong>Model: &#x3C;/strong>&#x3C;span>" +
                itemData.info.model +
                "&#x3C;p>&#x3C;strong>Plate: &#x3C;/strong>&#x3C;span>" +
                itemData.info.plate +
                "&#x3C;/span>&#x3C;/p>&#x3C;p>&#x3C;strong>VIN: &#x3C;/strong>&#x3C;span>" +
                itemData.info.vin +
                "&#x3C;/span>&#x3C;/p>&#x3C;p>&#x3C;strong>Security key: &#x3C;/strong>&#x3C;span>" +
                itemData.info.key +
                "&#x3C;/span>&#x3C;/p>"
	);
}
</code></pre>

</details>

<details>

<summary><strong>qs</strong></summary>

Add the following into:\
*`qs-inventory\shared\items.lua`*

```lua
['vehiclekeys'] = {
	['name'] = 'vehiclekeys',
	['label'] = 'Vehicle Keys',
	['weight'] = 50,
	['type'] = 'item',
	['image'] = 'vehiclekeys.png',
	['unique'] = true,
	['useable'] = true,
	['shouldClose'] = true,
	['combinable'] = nil,
	['description'] = 'Advanced Vehicle Keys',
},
```

and this into:\
*`qs-inventory\config\metadata.js`*

<pre class="language-lua"><code class="lang-lua"><strong>New:
</strong>else if (itemData.name == "vehiclekeys") {
    return `
        &#x3C;p>&#x3C;strong>${itemData.info.label}&#x3C;/strong>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Model: &#x3C;/strong>&#x3C;span>${itemData.info.model}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Plate: &#x3C;/strong>&#x3C;span>${itemData.info.plate}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>VIN: &#x3C;/strong>&#x3C;span>${itemData.info.vin}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Security key: &#x3C;/strong>&#x3C;span>${itemData.info.key}&#x3C;/span>&#x3C;/p>
    `;
}


<strong>Old:
</strong>else if (itemData.name == "vehiclekeys") {
        $(".item-info-title").html("&#x3C;p>" + itemData.info.label + "&#x3C;/p>");
        $(".item-info-description").html(
                "&#x3C;p>&#x3C;strong>Model: &#x3C;/strong>&#x3C;span>" +
                itemData.info.model +
                "&#x3C;p>&#x3C;strong>Plate: &#x3C;/strong>&#x3C;span>" +
                itemData.info.plate +
                "&#x3C;/span>&#x3C;/p>&#x3C;p>&#x3C;strong>VIN: &#x3C;/strong>&#x3C;span>" +
                itemData.info.vin +
                "&#x3C;/span>&#x3C;/p>&#x3C;p>&#x3C;strong>Security key: &#x3C;/strong>&#x3C;span>" +
                itemData.info.key +
                "&#x3C;/span>&#x3C;/p>"
	);
}
</code></pre>

</details>

<details>

<summary><strong>ps</strong></summary>

Add the following into:\
*`qb-core\shared\items.lua`*

```lua
vehiclekeys = {
	name = 'vehiclekeys',
	label = 'Vehicle Keys',
	weight = 50,
	type = 'item',
	image = 'vehiclekeys.png',
	unique = true,
	useable = true,
	shouldClose = true,
	combinable = nil,
	description = 'Advanced Vehicle Keys',
},
```

And this to:\
p&#x73;*`-inventory/html/js/app.js`*

<pre class="language-lua"><code class="lang-lua"><strong>New:
</strong>else if (itemData.name == "vehiclekeys") {
    return `
        &#x3C;p>&#x3C;strong>${itemData.info.label}&#x3C;/strong>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Model: &#x3C;/strong>&#x3C;span>${itemData.info.model}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Plate: &#x3C;/strong>&#x3C;span>${itemData.info.plate}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>VIN: &#x3C;/strong>&#x3C;span>${itemData.info.vin}&#x3C;/span>&#x3C;/p>
        &#x3C;p>&#x3C;strong>Security key: &#x3C;/strong>&#x3C;span>${itemData.info.key}&#x3C;/span>&#x3C;/p>
    `;
}


<strong>Old:
</strong>else if (itemData.name == "vehiclekeys") {
        $(".item-info-title").html("&#x3C;p>" + itemData.info.label + "&#x3C;/p>");
        $(".item-info-description").html(
                "&#x3C;p>&#x3C;strong>Model: &#x3C;/strong>&#x3C;span>" +
                itemData.info.model +
                "&#x3C;p>&#x3C;strong>Plate: &#x3C;/strong>&#x3C;span>" +
                itemData.info.plate +
                "&#x3C;/span>&#x3C;/p>&#x3C;p>&#x3C;strong>VIN: &#x3C;/strong>&#x3C;span>" +
                itemData.info.vin +
                "&#x3C;/span>&#x3C;/p>&#x3C;p>&#x3C;strong>Security key: &#x3C;/strong>&#x3C;span>" +
                itemData.info.key +
                "&#x3C;/span>&#x3C;/p>"
	);
}
</code></pre>

</details>

<details>

<summary><strong>codem</strong></summary>

Add the following into:\
*`codem-inventory\config\itemlist.lua`*

```lua
vehiclekeys = {
	name = 'vehiclekeys',
	label = 'Vehicle Keys',
	weight = 50,
	type = 'item',
	image = 'vehiclekeys.png',
	unique = true,
	useable = true,
	shouldClose = true,
	combinable = nil,
	description = 'Advanced Vehicle Keys',
},
```

</details>

<details>

<summary><strong>core</strong></summary>

Add the following into your database:

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`, `desc`) VALUES
    ('vehiclekeys', 'Vehicle Keys', 1, 0, 1, NULL);
```

</details>

<details>

<summary><strong>origen</strong></summary>

Add the following into:\
*`origen_inventory\config\items.lua`*

```lua
['vehiclekeys'] = {
	['name'] = 'vehiclekeys',
	['label'] = 'Vehicle Keys',
	['weight'] = 50,
	['type'] = 'item',
	['image'] = 'vehiclekeys.png',
	['unique'] = true,
	['useable'] = true,
	['shouldClose'] = true,
	['combinable'] = nil,
	['description'] = 'Advanced Vehicle Keys',
},
```

</details>

<details>

<summary><strong>tgiann</strong></summary>

Add the following into:\
*`items.lua in your framework script`*

```lua
vehiclekeys = {
	name = 'vehiclekeys',
	label = 'Vehicle Keys',
	weight = 50,
	type = 'item',
	image = 'vehiclekeys.png',
	unique = true,
	useable = true,
	shouldClose = true,
	combinable = nil,
	description = 'Advanced Vehicle Keys',
},
```

</details>

<details>

<summary><strong>jaksam</strong></summary>

Add the following into:\
*`jaksam-inventory/_data/items.lua`*

```lua
['vehiclekeys'] = {
	['name'] = 'vehiclekeys',
	['label'] = 'Vehicle Keys',
	['weight'] = 50,
	['type'] = 'item',
	['image'] = 'vehiclekeys.png',
	['unique'] = true,
	['useable'] = true,
	['shouldClose'] = true,
	['combinable'] = nil,
	['description'] = 'Advanced Vehicle Keys',
},
```

</details>

<details>

<summary><strong>ak47</strong></summary>

Add the following into:\
*`ak47_inventory/shared/items.lua`*

```lua
['vehiclekeys'] = {
    label = 'Vehicle Keys',
    weight = 10,
    stack = false,
    close = true,
},
```

</details>

5. Configure everything to your liking in [Config.lua](/docs/scripts/fivecode-carkeys/config-file.md).<br>
6. Add the following into your database:

   ```sql
   CREATE TABLE IF NOT EXISTS `vehicle_keys` (
        `id` INT(11) NOT NULL AUTO_INCREMENT,
        `vehId` VARCHAR(50) NULL DEFAULT NULL COMMENT 'num or society (Universal key)' COLLATE 'utf8mb4_general_ci',
        `isActive` TINYINT(4) NOT NULL DEFAULT '1',
        `isStored` TINYINT(4) NOT NULL DEFAULT '0',
      PRIMARY KEY (`id`) USING BTREE
   );
   ```
7. Restart your inventory script and start fivecode\_carkeys, or restart your server.<br>
8. Enjoy the script!<br>
9. \[Optional] If you want to have item images in your inventory, go into the folder bellow and copy the images into your inventory:\
   *`fivecode_carkeys/Installation #9 - Images`*\
   \
   \- *`ox_inventory\web\images`*\
   \- *`qb-inventory\html\images`*\
   \- *`qs-inventory\html\images`*\
   \- *`ps-inventory\html\images`*\
   \- *`codem-inventory\html\itemimages`*\
   \- *`core_inventory\html\img`*\
   \- *`origen_inventory\html\images`*\
   *- `tgiann-inventory\inventory_images\images`*\
   *-* *`jaksam_inventory/_images/`*\
   \- *`ak47_inventory/web/build/images/`*

> If you need help with anything else, do not hesitate and open a support ticket in our [discord](https://discord.gg/Yf7GrHDuUr).
