> For the complete documentation index, see [llms.txt](https://infinity-labs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinity-labs.gitbook.io/docs/free-scripts/il-parking-meters/installation.md).

# Installation

### Requirements

* [**qb-core**](https://github.com/qbcore-framework/qb-core) — framework
* [**qb-target**](https://github.com/qbcore-framework/qb-target) — interaction targeting on parking meter props
* [**qb-minigames**](https://github.com/qbcore-framework/qb-minigames) — skill-check minigame, used when `Config.RobMethod` is `'minigame'` or `'both'`
* [**oxmysql**](https://github.com/overextended/oxmysql) — persistent player stats
* **\[xsound]** (<https://github.com/Xogy/xsound>) — plays the loud alarm sound when a player fails too many attempts in a row
* **ps-dispatch** *(optional)* — routes police alerts into a real MDT/dispatch UI instead of a bare map blip. See Dispatch Integration below. Not required — everything falls back to a native notify+blip if it isn't installed or running.

***

### Installation

1. **Drop the resource** into your `resources` folder as `IL-parkingmeters`. Keep this exact folder name — the bundled alarm sound is referenced by resource name (`nui://IL-parkingmeters/sounds/alarm.wav` in `config.lua`), so renaming the folder means updating that URL too.
2. **Import the database table.** Run `install.sql` against your server's database. It only creates one new table, `il_parkingmeters_stats` — it won't touch anything else.
3. **Load order.** Make sure `qb-target`, `qb-minigames`, `oxmysql`, and `xsound` all start before `IL-parkingmeters` in your `server.cfg`:

   ```
   ensure qb-core
   ensure qb-target
   ensure qb-minigames
   ensure oxmysql
   ensure xsound
   ensure IL-parkingmeters
   ```
4. **Configure `config.lua`.** Set your break-in method (`item`, `minigame`, or `both`), the required item (defaults to QBCore's stock `lockpick`), reward range, cooldowns/rate limiting, police alert chances, and the fail-alarm settings — every option is documented inline.
5. **Configure `config-zones.lua`.** Add any restricted zones (no robbing allowed, e.g. around your police station) and bonus zones (extra payout, e.g. downtown) as simple center + radius circles. Each zone can independently show/hide a map blip and/or its radius circle.
6. **Swap the alarm sound (optional).** A placeholder `sounds/alarm.ogg` is bundled; `fxmanifest.lua`'s `files` table already covers any `.ogg`/`.mp3`/`.wav` dropped into `sounds/`, so just drop your own clip in and update `Config.FailAlarm.Sound.Url` to match. If `xsound` isn't installed or running, the alarm automatically falls back to a native GTA ping sound instead (same fallback pattern as `IL-jammer`) — set `Config.FailAlarm.Sound.System = 'native'` to use that fallback by choice instead of `xsound`.
7. **Start the resource** and test by targeting a parking meter in-game. Use `/meterstats` to check a character's lifetime robbery stats.
