> For the complete documentation index, see [llms.txt](https://docs.qubitstudios.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qubitstudios.net/fivem-scripts/car-crafting/installation-and-configuration-1.md).

# Installation & Configuration

First, you need to install the scripts **required** for **Qubit Car Crafting** to work. After installing these scripts, you can put qubit-carcrafting into your resources folder and run it.

* oxmysql / mysql-async
* PolyZone - [**Download here**](https://github.com/qbcore-framework/PolyZone/archive/refs/heads/master.zip)
* xsound - [**Download here**](https://github.com/Xogy/xsound/archive/refs/tags/1.4.1.zip)
* ox\_lib - [**Download Here**](https://github.com/overextended/ox_lib/releases/download/v3.11.0/ox_lib.zip)
* ox\_target ( Optional for QBCore ) - [**Download Here**](https://github.com/overextended/ox_target/releases/download/v1.13.1/ox_target.zip)

## 1. Framework Configration

Qubit Car Crafting supports ESX and QB frameworks. If you're using a different framework, unfortunately you won't be able to run Qubit Car Crafting.

Open the `config.lua` and `fxmanifest.lua` change framework setttings for your needs

<details>

<summary>QBCore Settings</summary>

If you're using the qbcore framework, you should configure the framework settings in the config as follows

&#x20;Open `config.lua` and change these lines

```lua
Config.Framework = "QB" -- QB, oldESX, ESX
Config.CoreName = 'qb-core' -- qb-core, es_extended
Config.MenuName = 'qb-menu' -- qb-menu, ox_lib
Config.Target = "qb-target" -- qb-target, ox_target
Config.CustomLicenseColumn = 'license' 
```

</details>

<details>

<summary>ESX Settings</summary>

If you're using the qbcore framework, you should configure the framework settings in the config as follows

&#x20;Open `config.lua` and change these lines

```lua
Config.Framework = "ESX" -- QB, oldESX, ESX
Config.CoreName = 'es_extended' -- qb-core, es_extended
Config.MenuName = 'ox_lib' -- qb-menu, ox_lib
Config.Target = "ox_target" -- qb-target, ox_target
Config.CustomLicenseColumn = 'license' 
```

</details>

## 2. Importing Items

All items in car crafting are fully customizable. We have included a few items for crafting a vehicle, but you can change all of these or add any others you want.

{% hint style="info" %}
If you are using QBCore or OX, you don't need to import the SQL.
{% endhint %}

<details>

<summary>QBCore Item Configration</summary>

Go to the **qb-core** folder, open `qb-core/shared/items.lua`, and add the crafting items line at the bottom

```lua
 -- Car Crafting
['toolkit']  = {
    ['name'] = 'toolkit',
    ['label'] = 'Toolkit',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'toolkit.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'It is used to produce some things.'
},

['car_door']  = {
    ['name'] = 'door',
    ['label'] = 'Car Doors',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'door.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle door can be used in vehicle crafting.'
},

['car_battery']  = {
    ['name'] = 'car_battery',
    ['label'] = 'Car Battery',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'car_battery.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle battery can be used in vehicle crafting.'
},

['sparkplug']  = {
    ['name'] = 'sparkplug',
    ['label'] = 'Car Sparkplug',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'sparkplug.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle sparkplug can be used in vehicle crafting.'
},

['wheel']  = {
    ['name'] = 'wheel',
    ['label'] = 'Car Wheel',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wheel.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle wheel can be used in vehicle crafting.'
},

['car_glass']  = {
    ['name'] = 'car_glass',
    ['label'] = 'Car Glass',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'car_glass.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle glass can be used in vehicle crafting.'
},

['car_blueprint']  = {
    ['name'] = 'car_blueprint',
    ['label'] = 'Car Blueprint',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'car_blueprint.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle blueprint can be used in vehicle crafting.'
},
```

</details>

<details>

<summary>ESX Item Configration</summary>

Open your database and import these SQL lines for inventory.

```sql
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('toolkit','Toolkit','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_door','Car Doors','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_battery','Car Battery','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('sparkplug','Car Sparkplug','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('wheel','Car Wheel','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_glass','Car Glass','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_blueprint','Car Blueprint','1','1','1');
```

</details>

<details>

<summary>OX Item Configration</summary>

Go to `ox_inventory/data/items.lua` and copy & paste these items in bottom

```lua
	["toolkit"] = {
		label = "Toolkit",
		weight = 1,
		stack = true,
		close = true,
	},

	["car_door"] = {
		label = "Car Door",
		weight = 1,
		stack = true,
		close = true,
	},
	
	["car_battery"] = {
		label = "Car Battery",
		weight = 1,
		stack = true,
		close = true,
	},

	["car_blueprint"] = {
		label = "Car Blueprint",
		weight = 1,
		stack = true,
		close = true,
	},

	["car_glass"] = {
		label = "Car Glass",
		weight = 1,
		stack = true,
		close = true,
	},

	["sparkplug"] = {
		label = "Car Sparkplug",
		weight = 1,
		stack = true,
		close = true,
	},

	["wheel"] = {
		label = "Car Wheel",
		weight = 1,
		stack = true,
		close = true,
	},
```

</details>

## 3. Add Item Photos to Inventory

Place the item images you downloaded into the img or images folder of the inventory script you are using.

{% file src="/files/SVNWJWtrGoeqnW2Is0NM" %}

## Setup Finished 🎉

Our setup is now complete, and from this point on, our tasks will be related to customizations. qubit-car crafting comes with 3 default craft areas, which cover cars, helicopters, and marine vehicles. If you wish, you can completely remove these areas and add your own types of zones. The image below details what each area is used for.<br>

<figure><img src="/files/zI587oZZFHdzL7SL8Io5" alt=""><figcaption><p>Craftzone illustrated configration</p></figcaption></figure>

{% hint style="danger" %} <mark style="color:red;">**Red Plane**</mark> crafting cars spawning with **PolyZone** function if you are enter this red plane.
{% endhint %}

{% hint style="warning" %} <mark style="color:orange;">**Orange Box**</mark> it's defining height of the red plane.
{% endhint %}

{% hint style="success" %} <mark style="color:green;">**Green Zone**</mark> it's defining craftable car positions, must be in the red plane, can be multiple.
{% endhint %}

{% hint style="info" %} <mark style="color:blue;">**Blue Zone**</mark> it's defining crafted car spawn location.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qubitstudios.net/fivem-scripts/car-crafting/installation-and-configuration-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
