> 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_garages-paid/configuration.md).

# Configuration

All configuration is in `config.lua`. This file is **not escrowed** — you can freely edit it.

***

## General

| Option            | Type    | Default | Description                          |
| ----------------- | ------- | ------- | ------------------------------------ |
| `Config.Debug`    | boolean | `false` | Enable verbose debug logs in console |
| `Config.Language` | string  | `'en'`  | Active locale (`'en'` or `'hr'`)     |

***

## Vehicle Spawn Behavior

| Option                              | Type    | Default | Description                                              |
| ----------------------------------- | ------- | ------- | -------------------------------------------------------- |
| `Config.UseZlomaStance`             | boolean | `true`  | Apply zloma\_stance data on vehicle spawn                |
| `Config.TeleportIntoVehicle`        | boolean | `false` | Teleport player into vehicle when spawned from garage    |
| `Config.TeleportIntoVehicleImpound` | boolean | `false` | Teleport player into vehicle when retrieved from impound |

***

## Vehicle Preview System

3D vehicle preview renders the actual vehicle model on the spawn point instead of static images.

| Option                                     | Type    | Default               | Description                                                   |
| ------------------------------------------ | ------- | --------------------- | ------------------------------------------------------------- |
| `Config.VehiclePreview.enabled`            | boolean | `true`                | Enable 3D preview system                                      |
| `Config.VehiclePreview.cameraFov`          | number  | `55.0`                | Camera field of view                                          |
| `Config.VehiclePreview.views`              | table   | `{side, front, back}` | Camera angle presets — `distance`, `height`, `angle` per view |
| `Config.VehiclePreview.transitionDuration` | number  | `1500`                | Camera transition duration in ms                              |
| `Config.VehiclePreview.enableRotation`     | boolean | `true`                | Rotation effect during camera transitions                     |

***

## Police Settings

```lua
Config.PoliceJobs = {
    ['police'] = 0,    -- job_name = minimum_grade (0 = all ranks)
    ['sheriff'] = 0,
}
```

| Option                       | Type   | Default                                                | Description                                            |
| ---------------------------- | ------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `Config.PoliceJobs`          | table  | `{police=0, sheriff=0, lspd=0, bcso=0, sasp=0, fib=0}` | Job names with minimum grade for police impound access |
| `Config.PoliceImpoundMaxFee` | number | `500000`                                               | Maximum fee that can be set for police impound         |

***

## Impound Society Payments

Impound fees can be automatically distributed to society accounts.

```lua
Config.ImpoundSocietyPayment = {
    enabled = true,
    police_impound = { 'police' },
    personal_impound = { 'police' },
    org_impound = { 'police' },
}
```

| Option             | Type    | Default      | Description                              |
| ------------------ | ------- | ------------ | ---------------------------------------- |
| `enabled`          | boolean | `true`       | Enable society payment distribution      |
| `police_impound`   | table   | `{'police'}` | Accounts receiving PD impound fees       |
| `personal_impound` | table   | `{'police'}` | Accounts receiving personal impound fees |
| `org_impound`      | table   | `{'police'}` | Accounts receiving org impound fees      |

{% hint style="info" %}
Use **job names** (e.g., `'police'`), not full account names. zloma\_core handles prefixes automatically (e.g., `society_` for esx\_addonaccount).
{% endhint %}

Multiple accounts split fees equally. For example, `{'police', 'sheriff'}` splits 50/50.

***

## Admin Settings

| Option               | Type  | Default                             | Description                    |
| -------------------- | ----- | ----------------------------------- | ------------------------------ |
| `Config.AdminGroups` | table | `{'admin', 'headadmin', 'vlasnik'}` | Groups with admin panel access |

***

## Vehicle Tracking (Auto-Impound on Restart)

| Option                                   | Type    | Default | Description                                                                               |
| ---------------------------------------- | ------- | ------- | ----------------------------------------------------------------------------------------- |
| `Config.VehicleTracking.restartImpound`  | boolean | `true`  | Move "out" vehicles to impound on restart                                                 |
| `Config.VehicleTracking.deleteFromWorld` | boolean | `true`  | Delete "out" vehicles from world on restart                                               |
| `Config.VehicleTracking.orphanRecovery`  | boolean | `true`  | Recover vehicles without `garage_id` on start. First startup only, then change to `false` |

{% hint style="warning" %}
`Config.VehicleTracking.orphanRecovery` is meant only for the first startup recovery pass.

It is enabled by default so orphaned vehicles can be assigned correctly on initial start.

After the first successful startup, change it to `false` and leave it disabled.
{% endhint %}

***

## Persistent Vehicles

Session-persistent vehicles survive entity culling and respawn automatically until server restart.

This is useful on servers where parked or spawned garage vehicles should stay available even after nobody is close enough to keep the entity streamed in. Many garage systems do not handle this at all, so the vehicle disappears from the world even though it still exists in the database.

| Option                                           | Type    | Default | Description                                                                |
| ------------------------------------------------ | ------- | ------- | -------------------------------------------------------------------------- |
| `Config.PersistentVehicles.enabled`              | boolean | `false` | Enable session persistence for spawned garage vehicles                     |
| `Config.PersistentVehicles.spawnDistance`        | number  | `200.0` | Distance (meters) at which a missing tracked vehicle is allowed to respawn |
| `Config.PersistentVehicles.updateInterval`       | number  | `3000`  | How often the server checks tracked vehicle existence and position         |
| `Config.PersistentVehicles.respawnDelay`         | number  | `1500`  | Safety delay before respawn to reduce ghost/double-spawn issues            |
| `Config.PersistentVehicles.maxRespawnAttempts`   | number  | `3`     | Max recovery attempts before the system stops retrying                     |
| `Config.PersistentVehicles.impoundOnMaxAttempts` | boolean | `false` | Move the vehicle to impound instead of silently giving up                  |

{% hint style="info" %}
Persistent vehicles are session-only. They help with entity culling during the current server session, but they do not make vehicles survive a full server restart.
{% endhint %}

{% hint style="warning" %}
If `Config.PersistentVehicles.enabled = true` and another script deletes owned vehicles, that script should also include `@zloma_garages/zlDeleteHelper.lua` in its `shared_scripts` section.

Apply this to every garage, impound, cleanup, parking, or deletion resource that can remove owned vehicles.
{% endhint %}

Example:

```lua
shared_scripts {
    '@ox_lib/init.lua',
    '@zloma_garages/zlDeleteHelper.lua'
}
```

***

## Garage Behavior

| Option                                       | Type    | Default      | Description                                                                                |
| -------------------------------------------- | ------- | ------------ | ------------------------------------------------------------------------------------------ |
| `Config.StoreSettings.UseGarageStore`        | boolean | `false`      | Show "Store Vehicle" button in garage menu                                                 |
| `Config.StoreSettings.UseVehicleTargetStore` | boolean | `true`       | Target option to store vehicles                                                            |
| `Config.StoreSettings.AllowStoreFromInside`  | boolean | `false`      | Allow storing while sitting in vehicle                                                     |
| `Config.PublicGarageMode`                    | string  | `'location'` | `'universal'` = retrieve from any garage, `'location'` = only from the garage where stored |

***

## Spawn Point Collision

| Option                                       | Type    | Default | Description                                 |
| -------------------------------------------- | ------- | ------- | ------------------------------------------- |
| `Config.SpawnPointCheck.RadiusCar`           | number  | `3.5`   | Collision check radius for cars             |
| `Config.SpawnPointCheck.RadiusAir`           | number  | `8.0`   | Collision check radius for aircraft         |
| `Config.SpawnPointCheck.RadiusBoat`          | number  | `4.0`   | Collision check radius for boats            |
| `Config.SpawnPointCheck.FallbackOffset`      | number  | `5.0`   | Offset distance when all points occupied    |
| `Config.SpawnPointCheck.FallbackMaxAttempts` | number  | `5`     | Max offset attempts before force spawn      |
| `Config.SpawnPointCheck.TrustPreview`        | boolean | `true`  | Use preview spawn point without re-checking |
| `Config.SpawnFallbackOffset`                 | number  | `5.0`   | Global fallback offset                      |
| `Config.SpawnFallbackMaxAttempts`            | number  | `5`     | Global max fallback attempts                |

***

## Fake Plates

| Option                                    | Type    | Default        | Description                                      |
| ----------------------------------------- | ------- | -------------- | ------------------------------------------------ |
| `Config.FakePlates.enabled`               | boolean | `true`         | Enable fake plates system                        |
| `Config.FakePlates.itemName`              | string  | `'fake_plate'` | Inventory item name                              |
| `Config.FakePlates.useTargetSystem`       | boolean | `true`         | Enable target-based apply/remove                 |
| `Config.FakePlates.logActions`            | boolean | `false`        | Log actions to console                           |
| `Config.FakePlates.inventorySync.enabled` | boolean | `true`         | Sync trunk/glovebox on plate change              |
| `Config.FakePlates.inventorySync.custom`  | boolean | `false`        | Use custom sync from `sv_customization.lua`      |
| `Config.FakePlates.fuelSync.enabled`      | boolean | `true`         | Sync fuel type on plate change                   |
| `Config.FakePlates.fuelSync.custom`       | boolean | `false`        | Use custom fuel sync from `sv_customization.lua` |

See [Fake Plates](/zloma-scripts/zloma_garages-paid/features/fake-plates.md) for the full setup guide.


---

# 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_garages-paid/configuration.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.
