> For the complete documentation index, see [llms.txt](https://tg-dev.gitbook.io/tg-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tg-dev.gitbook.io/tg-dev-docs/tg-vehicleshop/config.md).

# Config

### Configuration Guide

#### `config/config.lua`

This is the main configuration file.

Use it to edit:

* Language
* Currency
* Speed unit
* Stock system
* Target or TextUI mode
* Interact key
* Payment accounts
* Plate format
* Custom plate
* Trade-in
* Test drive
* Job discounts
* Shops
* Admin menu
* Logs

#### `config/vehicles.lua`

This file controls categories and vehicle listings.

Main sections:

```lua
Config.Categories
Config.Vehicles
```

Every vehicle should have:

* `shop`
* `category`
* `model`
* `price`
* `stock`

Optional:

* `grade`

Example:

```lua
{ shop = 'pdm', category = 'sports', model = 'sultan', price = 12000, stock = 15 }
```

For job vehicles:

```lua
{ shop = 'police', category = 'patrol', model = 'police2', price = 0, stock = 15, grade = 1 }
```

#### `config/bridge.lua`

This file controls framework and integration behavior.

Use it to configure:

* Framework
* Vehicle storage
* Fuel system
* Vehicle keys
* Notify
* TextUI
* Target

The default setup uses `community_bridge`.

Most servers should start with:

```lua
TGBridge.Settings.UseCommunityBridge = true
```

Then adjust the systems inside the settings table if auto-detection does not match your server.

#### `config/lang.lua`

This file controls all translation text.

If you want to change UI text, notifications, admin messages, or log text, edit the active locale in this file.

### Shop Setup

Shops are configured in:

```lua
Config.Shops
```

Each shop can have:

* `label`
* `job`
* `coords`
* `vehicleType`
* `purchaseSpawn`
* `testDriveSpawn`
* `preview`
* `blip`
* `ped`

`job = nil` means the shop is public.

`job = 'police'` means only police can use it.

### Interaction Modes

TG Vehicle Shop supports two interaction modes.

#### TextUI Mode

Use this when you want a simple key-based interaction.

```lua
Config.General.Target = false
```

The key is controlled by:

```lua
Config.General.InteractKey
```

#### Target Mode

Use this when you want players to interact with a ped or zone through a target system.

```lua
Config.General.Target = true
```

If a shop has a ped, the target option is attached to the ped.

If a shop does not have a ped, the target option is created at the shop coordinates.

### Vehicle Keys and Fuel

Vehicle keys and fuel are handled through `config/bridge.lua`.

The bridge includes auto mode and manual system selection.

If your server does not give keys after purchase:

1. Open `config/bridge.lua`.
2. Check `TGBridge.Settings.VehicleKeys`.
3. Set the correct key system manually if auto mode cannot detect it.
4. Restart the resource and test a new purchase.

If fuel does not save or starts at the wrong value:

1. Open `config/bridge.lua`.
2. Check `TGBridge.Settings.Fuel`.
3. Set the correct fuel system manually if needed.
