> 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_keys-free-escrow/zloma_keys.md).

# Overview

**Production-ready vehicle keys system for FiveM**

> **Requires** [**zloma\_core**](https://github.com/ZlomaScripts/zloma_core) — This script is built on top of zloma\_core, a universal framework wrapper for ESX, QBCore, and QBox.

zloma\_keys handles physical vehicle keys, synced lock state, hotwire attempts, and NPC carjacking flows through `zloma_core` wrappers so the same resource works across ESX, QBCore, and QBox setups.

***

## Highlights

| Feature                     | Description                                                                                 |
| --------------------------- | ------------------------------------------------------------------------------------------- |
| **Physical Keys**           | Each key is a real inventory item with vehicle plate metadata                               |
| **Multiple Access Methods** | Keybind, command, target interaction, or item use                                           |
| **Hotwire System**          | Uses `ez_electricminigame` when installed, otherwise falls back to `ox_lib` skillCheck      |
| **Carjack System**          | Steal keys from armed NPC drivers with police alerts routed through `zloma_core`            |
| **Owned Vehicle Support**   | Choose whether DB-owned vehicles need keys or can start normally                            |
| **Safety Guards**           | Ownership cache cleanup and NPC exit waits are bounded to avoid stale state and stuck loops |
| **Escrow Ready**            | User-editable config and locales stay open                                                  |

***

## Dependencies

| Resource              | Required | Purpose                                                    |
| --------------------- | -------- | ---------------------------------------------------------- |
| `ox_lib`              | Yes      | Callbacks, progress UI, and hotwire fallback minigame      |
| `oxmysql`             | Yes      | Checks owned vehicle tables                                |
| `zloma_core`          | Yes      | Framework, inventory, target, and notification abstraction |
| `ez_electricminigame` | Optional | Dedicated electric wiring minigame for hotwire             |

`ez_electricminigame` repository:

<https://github.com/EZ-Scripts/ez_electricminigame>

If that resource is not installed or not started, zloma\_keys automatically switches hotwire attempts to an `ox_lib` skill check. The script remains fully usable without the external minigame.

***

## Escrow Layout

These files should remain open in an escrow release:

* `config.lua`
* `locales/en.lua`
* `locales/hr.lua`

Everything else can be escrowed safely because gameplay logic, cache handling, server validation, and dispatch routing live in protected modules.

***

## Quick Links

* [Installation](/zloma-scripts/zloma_keys-free-escrow/installation.md)
* [Configuration](/zloma-scripts/zloma_keys-free-escrow/configuration.md)
* [API Reference](/zloma-scripts/zloma_keys-free-escrow/api-reference.md)


---

# 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_keys-free-escrow/zloma_keys.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.
