# Configuration

Everything is in `lwk_stopstick/config.lua`. Restart the resource after a change.

## Access

**Config.Framework** `'auto' | 'qb' | 'esx' | 'standalone'` (default: `'auto'`)
`'auto'` picks qbx_core, then qb-core, then es_extended, then standalone.

**Config.Jobs** `table` (default: `{ police = true, sheriff = true, state = true }`)
Jobs that may use it on qb or esx. An empty table lets anyone.

**Config.Ace** `string | false` (default: `false`)
Standalone: an ace needed to use it, e.g. `'lwk_stopstick.use'`. `false` lets anyone.

## Supply

**Config.Source** `'vehicle' | 'item' | 'free' | 'auto'` (default: `'vehicle'`)
Where sticks come from. See [Overview](/docs/lwk_stopstick/overview#where-sticks-come-from).

**Config.Item** `string` (default: `'stopstick'`)
The inventory item name.

**Config.PerVehicle** `number` (default: `2`)
Sticks each vehicle carries in vehicle mode.

**Config.Vehicles** `string[]` (default: `{}`)
Models that carry sticks, e.g. `{ 'police', 'police3' }`. Empty means any emergency-class vehicle.

## Keys

**Config.Keys** `table`

| Field | Default | What it does |
|---|---|---|
| `use` | `'G'` | Carrying: throw. Holding the cord: yank |
| `release` | `'X'` | Let go of the cord |
| `take` | `''` | Take one out / put it away. Empty: no default key, `/stopstick` still works |

## Throwing and the cord

| Option | Default | What it does |
|---|---|---|
| `Config.ThrowMin` | `2.5` | Closest throw, metres |
| `Config.ThrowRange` | `9.0` | Furthest throw, metres |
| `Config.CordLength` | `24.4` | Metres of cord (80 ft). Walking further lets go |
| `Config.YankSpeed` | `16.0` | m/s the stick shoots toward you when the cord goes taut |
| `Config.YankDistance` | `12.0` | Most one yank brings it in, metres |
| `Config.MinDistance` | `1.5` | A yank stops this far from you, metres |

## Tyres and cleanup

| Option | Default | What it does |
|---|---|---|
| `Config.BurstToRim` | `false` | `false`: instantly flat but drivable. `true`: straight onto the rim |
| `Config.HitWidth` | `0.18` | Metres either side of the stick's line that count as running over it |
| `Config.Despawn` | `900` | Seconds a stick nobody holds stays on the road. `0` keeps it forever |
| `Config.DrawDistance` | `100.0` | Metres the sticks are drawn from |

## Text

**Config.Text** `table`
Every message the player sees, for translating or rewording. `%s` and `%d` are filled in: the hit message is `'~g~Stop Stick hit!~s~ %s, %d tyre%s'` (vehicle name, tyre count, plural s).

## Models

`Config.Props`, `Config.Anim`, `Config.Attach`, `Config.CordExit` and `Config.HalfLength` come from the model and animation build. Leave them alone unless you rebuild the models; the Blender build scripts are in `models/`.

## Debug

**Config.Debug** `boolean` (default: `false`)
F8 logs, and draws each stick's hit line and the wheel sweeps of vehicles near it.
