# LuaLab-VehicleShop

## LuaLab Vehicle Shop Documentation

### Table of Contents

1. Installation
2. Configuration
3. Features
4. Troubleshooting

### Installation

#### Prerequisites

* Latest QBCore Framework
* oxmysql
* PolyZone
* qb-target (optional)

#### Steps

1. Download the latest release
2. Extract to resources folder
3. Import SQL file:

### Configuration

* Edit `config.lua` to customize:
  * Shop locations
  * Test drive settings
  * Vehicle categories
  * Job requirements
  * Marker settings
  * And more...

#### Shop Locations

```lua
Config.Shops = {
['galeri'] = {
['Type'] = 'car',
['Target'] = {x = -56.13, y = -1096.65, z = 26.42},
-- More settings...
}
}
```

### Usage

#### For Players

* Visit any vehicle shop location
* Browse vehicles by category
* Search for specific vehicles
* Test drive before purchase
* Choose vehicle color
* Purchase with cash or bank

#### For Job Owners

* Control who can buy vehicles
* Set test drive permissions
* Manage vehicle stock

### Support

* Discord: [Join Our Server](https://discord.gg/luaLab)
* Documentation: Read More

### License

This project is licensed under the MIT License - see the LICENSE file for details

4. Add to server.cfg:

```lua
ensure luaLab-vehicleshop
```

#### Test Drive Settings

```lua
Config.TestDriveCost = 500
Config.TestDriveTime = 30
```

#### Job Requirements

```lua
['Job'] = 'cardealer' -- Set to 'none' for public access
```

### Features

#### Search System

* Search by vehicle name
* Search by brand
* Search by model
* Results grouped by category

#### Color System

* Multiple color options
* Preview before purchase
* Saved with vehicle

#### Test Drive

* Time-limited test drives
* Configurable cost
* Safe return system

### Troubleshooting

#### Common Issues

1. Vehicle not spawning
2. Database errors

* Ensure SQL file is imported
* Check database credentials
* Verify table structure

3. Job permissions

* Confirm job names match your server
* Check player job assignment
* Verify job grade requirements


---

# 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://lualab.gitbook.io/lualab-docs/lualab-scripts/lualab-vehicleshop.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.
