> 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="https://2160533239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr5gBuWKpQv25VIvFpNzT%2Fuploads%2FC1od0z4nLkdyriO5uexP%2FDXS_Car_Lock.png?alt=media&amp;token=55ff8ea4-c341-4f4c-90b2-58e477a25a6b" 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.
