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

# Installation

## Requirements

| Resource     | Version | Link                                                 |
| ------------ | ------- | ---------------------------------------------------- |
| `ox_lib`     | Latest  | [GitHub](https://github.com/overextended/ox_lib)     |
| `oxmysql`    | Latest  | [GitHub](https://github.com/overextended/oxmysql)    |
| `zloma_core` | 1.0.0+  | [GitHub](https://github.com/ZlomaScripts/zloma_core) |

***

## Step 1 — Place the Resource

```
resources/
  [zloma]/
    zloma_core/
    zloma_vehicleshop/
```

***

## Step 2 — Database Setup

zloma\_vehicleshop includes a schema manager that automatically creates and migrates its required database tables on startup.

If you prefer a manual setup, you can still import `sql/install.sql` before the first start.

The system manages these main dealership tables:

* `zloma_vehicleshops`
* `zloma_vehicleshop_categories`
* `zloma_vehicleshop_vehicles`
* `zloma_vehicleshop_orders`
* `zloma_vehicleshop_employees`
* `zloma_vehicleshop_transactions`

Automatic startup migration also adds missing columns for older installs, including later business-mode fields.

***

## Step 3 — Server Config

Add to your `server.cfg` in this order:

```cfg
ensure ox_lib
ensure oxmysql
ensure zloma_core
ensure zloma_vehicleshop
```

{% hint style="warning" %}
`zloma_core` must start **before** `zloma_vehicleshop`.
{% endhint %}

***

## Step 4 — Configure

Edit `config.lua` for your server settings. Most important values on first install:

* `Config.AdminGroups`
* `Config.Language`
* `Config.TestDrive.duration`
* `Config.TradeIn.*`
* `Config.Business.*`
* `Config.PlatePrefix`

If you want Discord logging, set webhook URLs in `sv_customization.lua`.

***

## Step 5 — Optional Open File Customization

Two files are intentionally left open in escrow releases:

| File                   | Side   | Purpose                                                                        |
| ---------------------- | ------ | ------------------------------------------------------------------------------ |
| `cl_customization.lua` | Client | Shop open/close hooks, purchase hook, test drive hooks, custom HUD integration |
| `sv_customization.lua` | Server | Discord webhooks and post-purchase / post-trade-in hooks                       |

***

## Step 6 — Create Your First Salon

1. Join the server with an admin group from `Config.AdminGroups`.
2. Run `/vehicleshopadmin`.
3. Create a salon and set its world location.
4. Configure spawn point, showroom position, ped, camera, test drive location, and optional trade-in.
5. Add categories.
6. Add vehicles to each category.
7. If using business mode, set job name, owner/employee structure, and procurement settings.

***

## Post-Install Check

After setup, verify these flows:

1. Open a salon and browse vehicles.
2. Start and end a test drive.
3. Purchase one vehicle.
4. Run `/refreshshops` after any direct DB edits.
5. If business mode is enabled, open the boss menu and confirm pricing, employees, and orders load correctly.


---

# 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://zloma-scripts.gitbook.io/zloma-scripts/zloma_vehicleshop-paid/installation.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.
