> For the complete documentation index, see [llms.txt](https://katana-kraft-studio.gitbook.io/katana-kraft-studio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://katana-kraft-studio.gitbook.io/katana-kraft-studio-docs/ks-resource/ks-cardealership.md).

# KS-CarDealership

## Installation Guide

To install the script correctly, follow these steps:

{% stepper %}
{% step %}

### Add the script to your resources folder

Drag and drop the script folder into your server's `resources` directory.
{% endstep %}

{% step %}

### Import the SQL file

Import the included `.sql` file into your server database to create all required tables for proper script functionality.
{% endstep %}

{% step %}

### Start the script

Open your `server.cfg` file and add the following line:

```
ensure KS-Cardealership
ensure ks_custom_props
```

{% endstep %}

{% step %}

### Add the item

To use the used vehicle contract, you need to add the following item to your inventory (e.g. `ox_inventory/data/items.lua`).

```lua
['contractused'] = {
    label = 'Contract car',
    weight = 200,
    stack = true,
    server = {
        export = 'KS-Cardealership.opencontractusedvh'
    }
},
```

{% endstep %}

{% step %}

### Configure the script

After installation, open:

```lua
shared/config.lua
```

and adjust all settings according to your server preferences.
{% endstep %}
{% endstepper %}

### Notes

Make sure all required dependencies are installed before starting the script.

* [ox\_lib](https://github.com/overextended/ox_lib)
* [ox\_target](https://github.com/overextended/ox_target) or [qb-target](https://github.com/qbcore-framework/qb-target)
* [ox\_inventory](https://github.com/overextended/ox_inventory)

## 📬 Need Help or Support?

If you have any questions, need help with setup, or want to report a bug, feel free to join our support Discord:

👉 [**Join our Discord server**](https://www.discord.gg/katanakraftstudio)

We're happy to help and welcome all feedback and suggestions!
