> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_dealership/installation.md).

# Installation

Follow these steps to install `rcore_dealership` for the first time.

## 📋 Prerequisites

Before installing, make sure your server has:

| Requirement              | Notes                                   |
| ------------------------ | --------------------------------------- |
| Artifact `4752` or newer | Older artifacts can break the resource. |
| Database resource        | `oxmysql` is recommended.               |
| Framework                | ESX, QBCore or QBox.                    |

{% hint style="info" %}
`rcore_dealership` ships with everything it needs. There is no separate assets resource to install.
{% endhint %}

## 🛠️ First Time Installation

{% stepper %}
{% step %}

### Download the resource

Download `rcore_dealership` from [CFX Portal](https://portal.cfx.re/assets/).
{% endstep %}

{% step %}

### Move the folder

Move the `rcore_dealership` folder into your server 📁`resources` folder.

```
📁 server
└── 📁 resources
    ├── 📁 rcore_dealership
    └── 📁 other resources
```

{% endstep %}

{% step %}

### Ensure the resource

Add the resource to `server.cfg` after your framework, database, and target resources.

```cfg
ensure rcore_dealership
```

{% endstep %}

{% step %}

### Seed the vehicles

Start the server once. The script creates its database tables automatically.

After the tables are created, run this in the server console:

```cfg
dealership_seed_vehicles
```

This imports every vanilla vehicle into the database and calculates a price for each one. See the [Vehicles config](/paid-resources/rcore_dealership/configuration/vehicles-seed.md) for how prices are generated.
{% endstep %}

{% step %}

### Load a map preset (optional)

If you use a supported map, load its dealership preset from the server console. See the [Presets](/paid-resources/rcore_dealership/installation/presets.md) page for the available maps and commands.
{% endstep %}

{% step %}

### Configure the script

Join the server and open the admin tablet:

```cfg
/dealershipadmin
```

Use the tablet to place dealerships, set prices, and manage everything else in-game.
{% endstep %}
{% endstepper %}

## 🗄️ Database

`rcore_dealership` creates its own database tables automatically on startup. You do not need to import an SQL file manually.

Vehicles are not inserted until you run `dealership_seed_vehicles` from the server console.

## 🐞 Debug

If something does not work, set `Config.Debug = true` in `config.lua` to print extra information to the client (F8) and server console. Include those logs when opening a support ticket.
