# Configuration

All static resource settings live in `shared/config.lua`.

## General settings

`KOJA.ImagesPath` defines the vehicle image URL. Use `${model}` as the vehicle model placeholder.

The default FiveM CDN provides images for base GTA vehicles. Missing images fall back to `web/images/<model>.png`.

Use a local NUI path or an external image URL. Add custom vehicle renders to `web/images/`.

`KOJA.Locale` sets the notification and UI language. Available locales are `en` and `pl`.

`KOJA.Notify` selects the notification integration. Choose `esx`, `qb`, or `ox`.

`KOJA.Target` enables target interactions for NPC dealerships. It only affects dealers using `interaction = "npc"`.

## Plates and database

Use `KOJA.PlateFormat` to set plate letter count, number count, and separator.

`KOJA.CreateAutoTable` creates required database tables when the resource starts.

Set it to `false` after manually importing `koja-cardealer.sql`.

## Admin access

`KOJA.Admin.command` sets the command that opens the admin menu.

`KOJA.Admin.aceResource` sets the server-side ACE permission. Grant it to the required ACE group.

`KOJA.Admin.groups` lists framework groups allowed to open the menu.

## Prestige

`KOJA.Prestige.enable` enables vehicle prestige requirements and the built-in progression system.

`xpPerLevel` sets XP needed for each prestige level. `xpPerPurchase` grants XP after vehicle purchases.

Configure admin and console command names in `KOJA.Prestige.commands`.

Override prestige integrations in `shared/utils.lua` with `Misc.Utils.GetPlayerPrestige`.

Use `Misc.Utils.OnVehiclePurchased` to react to completed vehicle purchases.

## Promotions and stock

`KOJA.Promotions.enable` enables timed vehicle promotions.

`interval` defines minutes between promotion rotations. Set `category` to `random` or a category name.

`count` controls promoted vehicle quantity. `discount` controls the percentage discount range.

`KOJA.LimitedStock.enable` enables stock counters for vehicles marked as limited.

`hideWhenSoldOut` hides sold-out vehicles when `true`. When `false`, the UI greys them out.

## Coupons

`KOJA.Coupons.enable` enables coupon redemption in the dealership UI.

`KOJA.Coupons.codes` provides first-start seed codes only. Manage active codes through **Coupon codes**.

Each seed code supports a percentage discount, a total usage limit, and per-player usage.

## VIP

`KOJA.Vip.enable` enables VIP features.

`purchasable` controls whether players can buy VIP in the UI.

Set `price`, `days`, and `discount` for VIP purchases and pricing benefits.

`days = 0` grants lifetime VIP. Edit `benefits` to change text in the VIP modal.

## Leasing

`KOJA.Leasing.enable` enables vehicle financing.

Configure the panel command with `command`.

Set the down payment, installment count, interest, and payment interval.

`graceHours` defines the late-payment window. `maxMissedPayments` triggers vehicle repossession.

## Test drives

`KOJA.TestDrive.secondslimit` sets the test-drive duration.

`tuningPrice` sets the Full Tuning test-drive price. Regular test drives are free.

`cancelKey` sets the key used to end a test drive.

## Dealer defaults

Dealers created from the admin menu use defaults from `KOJA.Defaults`.

Configure the preview spawn, NPC model, interaction text, draw distance, and blip settings.

Set `vehicleSpawn` to a hidden area. Players must never see preview vehicles.

## Updating

Run `npm run build` after changing files in `web/`.

Lua-only changes require a resource restart.

## Related pages

- [Features](/free/car-dealer-v2/features) — Player-facing dealership, progression, promotion, and leasing features.
- [Installation](/free/car-dealer-v2/installation) — Install Car Dealer V2 and its required dependencies.
- [Exports & Commands](/free/car-dealer-v2/exports-and-commands) — Admin, leasing, and prestige commands with available server exports.
- [Admin Menu](/free/car-dealer-v2/admin-menu) — Create and manage dealerships live in-game.
- [Database](/free/car-dealer-v2/database) — Understand dealer storage, tables, and server-side price calculation.
- [Car Dealer V2](/free/car-dealer-v2) — back to the section overview
