> For the complete documentation index, see [llms.txt](https://dxs-scripts.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dxs-scripts.gitbook.io/home/documentation/fivem/dxs-car-lock.md).

# DXS Car Lock

<figure><img src="/files/o6StDvApsSGEgxHoyqqQ" alt=""><figcaption></figcaption></figure>

### Installation

1. Download the resource and place it in your `resources` folder.
2. Rename the folder to `dxs_carlocks` (if it's not already).
3. Ensure you have the required dependencies installed.
4. Add the following to your `server.cfg`:

   ```cfg
   ensure dxs_carlocks
   ```

### Dependencies

* **Framework**: `es_extended` (ESX) OR `qb-core` (QBCore)
* **Database**: `oxmysql` or `mysql-async` (depending on your framework setup)

### Configuration

You can customize the script in `config.lua`:

* **Framework**: Set to `'ESX'` or `'QB'`.
* **Command**: Change the command to open the menu (Default: `carkeys`).
* **OpenKey**: Set the default keybind (Default: `U`).
* **EnableOwnership**: Toggle ownership checks (True/False).
* **Distance**: Interaction range for the key fob.

### Usage

* **Command**: Type `/carkeys` in chat to open the key fob.
* **Keybind**: Press `U` (default) to open the UI.
* **Interaction**:
  * Click **Lock/Unlock** to toggle vehicle doors.
  * Use **Finder** to flash lights and honk (if enabled).
  * Use **Windows** to roll down/up windows.
