# Installations

## Step 1 ➡ Dependencies&#x20;

This is one of the most important parts, since without the dependencies, the resource will never work or not start, here we will list the dependencies with their respective links for you to download and add them to your server.

{% embed url="<https://github.com/overextended/oxmysql>" %}

{% embed url="<https://github.com/overextended/ox_inventory>" %}
Recomended
{% endembed %}

{% embed url="<https://github.com/overextended/ox_target>" %}
Recomended
{% endembed %}

## Step 2 ➡ Resources in server.cfg

{% hint style="warning" %}
if you are using ESX ➡ NEVER, but NEVER, you must place the resources above `es_extended`, if you do this they will never work and will throw errors
{% endhint %}

The correct order of the resources is as follows, always keeping <mark style="color:orange;">es\_extended</mark> and its cores above, but the other normal resources below

```
ensure sfcrafting
```

## Step 3 ➡ Database

Run query/SQL query and paste below code

{% code fullWidth="false" %}

```sql
CREATE TABLE `crafting` (
  `id` int NOT NULL,
  `name` varchar(64) NOT NULL,
  `invid` varchar(64) NOT NULL,
  `job` varchar(128) NOT NULL,
  `itemid` varchar(64) NOT NULL,
  `products` text NOT NULL,
  `display` int NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `crafting` ADD PRIMARY KEY (`id`);
ALTER TABLE `crafting` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

```

{% endcode %}

Example data for crafting tables:

```sql
INSERT INTO `crafting` (`name`, `invid`, `job`, `itemid`, `products`, `display`) VALUES ('table2', 'client', 'none', 'cocaine', '[{\"amount\":\"1\",\"item\":\"drug_white\"}]', 0);
INSERT INTO `crafting` (`name`, `invid`, `job`, `itemid`, `products`, `display`) VALUES ('table1', 'client', 'none', 'heartstopper', '[ {\"amount\":\"1\",\"item\":\"bun\"},{\"amount\":\"3\",\"item\":\"patty\"},{\"amount\":\"3\",\"item\":\"cheese\"},{\"amount\":\"1\",\"item\":\"tomato\"},{\"amount\":\"1\",\"item\":\"lettuce\"},{\"amount\":\"1\",\"item\":\"sauce\"}, ]', 1);
```

## Step 4 ➡ Click on [Config](https://docs.scriptsfivem.com/resources/sfcrafting/config)&#x20;
