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

# Troubleshooting

This page covers common DZ Customs setup issues and how to fix them.

***

### Blips or Markers Do Not Appear

#### Check the resource started correctly

Look in your server console for errors after starting:

```cfg
ensure dz_customs
```

or:

```cfg
restart dz_customs
```

If the resource has a startup error, blips, markers, and zones may not be created.

***

#### Check shop configuration

Make sure you have at least one shop inside:

```lua
Config.Shops
```

Example:

```lua
Config.Shops = {
    {
        label = 'Los Santos Customs',
        coords = vec3(-337.38, -136.92, 39.01),
        size = vec3(5.5, 5.5, 3.0),
        rotation = 70.0,
        marker = true,
        categories = Config.DefaultCategories
    }
}
```

***

#### Check global blip settings

```lua
Config.Blips.enabled = true
```

If all blips are disabled, no shop blips will show.

***

#### Check global marker settings

```lua
Config.Markers.enabled = true
```

If all markers are disabled, no shop markers will show.

***

#### Check per-shop marker setting

Each shop can disable its own marker:

```lua
marker = false
```

To show the marker:

```lua
marker = true
```

***

### I Cannot Open the Shop

#### Check interaction mode

Valid interaction modes:

```lua
Config.Interaction = 'textui'
```

or:

```lua
Config.Interaction = 'target'
```

If using target mode, make sure `ox_target` is installed and started before `dz_customs`.

***

#### Check vehicle requirement

Players must be inside a vehicle to use DZ Customs.

The system cannot open on foot because it needs a vehicle to scan, preview, modify, and save.

***

#### Check driver requirement

If enabled:

```lua
Config.RequireDriver = true
```

Only the driver can open the shop.

If you want passengers to be able to open it:

```lua
Config.RequireDriver = false
```

***

#### Check ownership requirement

If enabled:

```lua
Config.Persistence.requireOwnedVehicle = true
```

The player must be in a vehicle they own.

If the vehicle is not owned, the UI will not open.

***

#### Check job restrictions

If a shop has:

```lua
job = 'mechanic'
```

only players with the `mechanic` job can use that shop.

For a public shop:

```lua
job = nil
```

***

### I Get “You Can Only Customise Vehicles You Own”

This means ownership checking is enabled.

Check:

```lua
Config.Persistence.requireOwnedVehicle = true
```

If you want to allow unowned vehicles:

```lua
Config.Persistence.requireOwnedVehicle = false
```

Note:

```
Unowned vehicles will not be saved to the database.
```

***

### Vehicle Ownership Is Not Detected Correctly

#### Check database settings

```lua
Config.Persistence.database = {
    table = 'owned_vehicles',
    ownerColumn = 'owner',
    plateColumn = 'plate',
    vehicleColumn = 'vehicle'
}
```

Make sure these match your garage/database structure.

***

#### Check plate formatting

Some garages store plates with spaces.

Recommended:

```lua
trimPlate = true
```

This helps prevent ownership mismatches.

***

#### Check player identifier

The script checks ownership using the player identifier and vehicle plate.

If your framework or garage uses a different identifier format, the persistence logic may need adjusting.

***

### Checkout Fails

#### Empty basket

The player must select at least one paid modification before checkout.

***

#### Invalid basket

The server rejected the basket because one or more items were invalid.

This can happen if:

* A client sent modified NUI data
* An unsupported item type was sent
* Duplicate basket keys were sent
* The item failed server-side price validation

***

#### Invalid payment method

Check:

```lua
Config.PaymentMethods
Config.DefaultPaymentMethod
```

Example valid setup:

```lua
Config.PaymentMethods = {
    cash = true,
    bank = true,
    society = false
}

Config.DefaultPaymentMethod = 'bank'
```

The default payment method must be enabled.

***

#### Not enough money

The player does not have enough money in the selected account.

For cash:

```
Player cash account is checked.
```

For bank:

```
Player bank account is checked.
```

For society:

```
Society shared account is checked.
```

***

### Society Payment Does Not Work

#### Check payment method is enabled

```lua
Config.PaymentMethods.society = true
```

***

#### Check society config is enabled

```lua
Config.SocietyPayment.enabled = true
```

***

#### Check allowed jobs

```lua
allowedJobs = {
    mechanic = true
}
```

The player’s job must be listed.

***

#### Check boss requirement

If this is enabled:

```lua
requireBoss = true
```

only boss grade players can use society payment.

***

#### Check society account exists

Example account:

```
society_mechanic
```

The account name is built from:

```lua
accountPrefix .. jobName
```

Example:

```lua
accountPrefix = 'society_'
jobName = 'mechanic'
```

Result:

```
society_mechanic
```

***

#### Check society account balance

If the society account does not have enough money, checkout will fail.

***

### Vehicle Modifications Do Not Save

#### Check persistence is enabled

```lua
Config.Persistence.enabled = true
```

***

#### Check oxmysql is running

`oxmysql` is required for saving owned vehicle data.

Make sure it starts before `dz_customs`:

```cfg
ensure oxmysql
ensure dz_customs
```

***

#### Check database column

The vehicle data column should contain JSON vehicle properties.

Default:

```lua
vehicleColumn = 'vehicle'
```

***

#### Check garage compatibility

DZ Customs saves vehicle properties to the database, but your garage must correctly apply those properties when the vehicle is retrieved.

If modifications save but do not appear after garage retrieval, the issue is usually the garage restore logic.

***

### Wheels Do Not Restore Correctly

Some garage systems restore wheel mod index but not wheel type.

Correct wheel restoration needs both:

```
wheel type
wheel mod index
```

If wheels appear wrong after storing/retrieving, check your garage vehicle property apply function.

***

### Chameleon Paints Do Not Work

#### Check optional resource is installed

```cfg
ensure dz_chameleonpaints
ensure dz_customs
```

The paint resource must start before DZ Customs.

***

#### Check config

```lua
Config.Paint = {
    enableChameleon = true,
    requireExternalPaintResource = true,
    paintResourceName = 'dz_chameleonpaints'
}
```

***

#### Check resource files

The optional paint resource should contain:

```
carcols_gen9.meta
carmodcols_gen9.meta
stream/vehicle_paint_ramps.ytd
client/textentries.lua
```

***

#### Avoid restarting the paint resource live

Avoid:

```cfg
restart dz_chameleonpaints
```

while players are connected.

If you update paint data or streamed files, do a full server restart.

***

### Tyre Smoke Is Not Visible

Some colours are hard to see depending on road surface and lighting.

Pure black smoke may look invisible.

Use a dark grey value instead:

```lua
{ value = { r = 45, g = 45, b = 45 }, label = 'Black' }
```

***

### Tyre Smoke Burnout Moves the Vehicle

Lower the preview duration:

```lua
duration = 1500
```

Make sure this is enabled:

```lua
refreezeAfterPreview = true
```

***

### NUI Shows Incorrect Currency

Check:

```lua
Config.Currency = '£'
```

Examples:

```lua
Config.Currency = '$'
Config.Currency = '€'
```

Restart the resource after changing it:

```cfg
restart dz_customs
```

***

### NUI Payment Buttons Are Missing

The NUI only shows enabled payment methods.

Check:

```lua
Config.PaymentMethods = {
    cash = true,
    bank = true,
    society = false
}
```

If a method is set to `false`, it will be hidden.

***

### Validation Warnings

DZ Customs includes startup validation.

Warnings are there to help with configuration issues.

Examples:

```
Chameleon paints are enabled, but dz_chameleonpaints is not started.
```

or:

```
Config.Interaction is set to target, but ox_target is not started.
```

Fix the related config or dependency and restart the resource.
