# 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/mkafrin/PolyZone>" %}

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

{% embed url="<https://store.scriptsfivem.com/package/5834252>" %}

### Not required but recommended:

{% embed url="<https://github.com/overextended/ox_inventory>" %}
pre-configured for ox\_inventory in client\_editable.lua/server\_editable.lua
{% 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 sfmechanic
```

## Step 3 ➡ Database

Run query/SQL query and paste below code.

{% code fullWidth="false" %}

```sql
CREATE TABLE `jobs_mechanic_projects` (
  `id` int(11) NOT NULL,
  `playerid` varchar(64) NOT NULL,
  `model` varchar(64) NOT NULL,
  `model_name` varchar(64) NOT NULL,
  `code` varchar(16) NOT NULL,
  `name` varchar(32) NOT NULL,
  `parts` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

ALTER TABLE `jobs_mechanic_projects` ADD PRIMARY KEY (`id`);
ALTER TABLE `jobs_mechanic_projects` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
```

{% endcode %}

In the case of the ESX framework. For another framework, modify the query according to the name of the table and columns.

If you don't have a `price` column in the `vehicles` table

{% code fullWidth="false" %}

```sql
ALTER TABLE `vehicles` ADD `price` INT(11) NULL DEFAULT NULL AFTER `model`;
```

{% endcode %}

If you don't have a `class` column in the `vehicles` table

{% code fullWidth="false" %}

```sql
ALTER TABLE `vehicles` ADD `class` VARCHAR(2) NULL DEFAULT NULL AFTER `category`;
```

{% endcode %}

For nitrous system:\
❗`if you have another table that stores vehicles change owned_vehicles to your table`

{% code fullWidth="false" %}

```sql
ALTER TABLE `owned_vehicles` ADD `forgedEngine` INT(2) NOT NULL DEFAULT '0', ADD `nitrousEnabled` INT(2) NOT NULL DEFAULT '0', ADD `nitrousValue` FLOAT(11) NOT NULL DEFAULT '0';
```

{% endcode %}

{% hint style="warning" %}
Remember to use exports that will save the current nitro state or assign the state to the vehicle. \
`Exports are available in the client_editable.lua and server_editable.lua files.`
{% endhint %}

## Step 4 ➡ Click on [Config](/resources/sfmechanic/config.md)


---

# Agent Instructions: 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.scriptsfivem.com/resources/sfmechanic/installations.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.
