> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Keyless entry and relay attack

> Cars that open at the handle and lock by themselves, the relay device that steals their signal, and the signal blocker that protects it

**Keyless entry** makes some cars work like a modern car: the owner opens them at the handle and they lock by themselves when the owner walks away. The **relay attack** is the thief's answer: a device that catches the key signal of a keyless car. The **signal blocker** protects the owner.

Both are **off by default**.

## Keyless entry

### For the player

* Walk to your keyless car and press **F** at the handle: it unlocks and you get in. You read "Unlocked by your keyless key"
* Get out and walk away: after a few seconds and a few meters it locks by itself. You read "Locked by itself: you walked away (keyless)"
* It does not lock if somebody is still inside or a door is open. You read "Not locked by itself: a door is open"
* Your remote shows a **Keyless** badge on these cars
* Don't want it to lock by itself? Open the remote, press the gear and untick **Lock by itself when I walk away (keyless cars)**

**U** and the remote keep working as usual on keyless cars.

### For the admin

Open `/vehiclekeys` > **Settings** > **Keyless entry**.

| Option | What it does |
| - | - |
| Cars of the ticked classes open at the handle and lock by themselves | Turns keyless entry on |
| Vehicle classes with keyless entry | Only cars of the ticked classes have it. **Sports + Super** and **Every car** tick them in one click |
| Distance that locks it (meters) | How far the driver must walk, 8 m by default |
| Seconds after getting out before it can lock | 3 s by default |

## Relay attack

Only cars with **keyless entry** can be caught. Keyless entry must be on, or the relay catches nothing.

### For the thief

**1. Turn the device on**

Use the **Relay device** (`key_relay`) from your inventory. A card shows "Relay listening", the time left and "Keyless cars in range".

**2. Wait near an owner**

Stay within range (25 m by default) of a keyless car. When its owner locks or unlocks it, in any way (key, remote, handle or walking away), the signal arrives.

**3. Catch the signal**

A minigame starts. With the default one, press **Space** to stop the needle inside the green window 3 times.

**4. Drive away**

You read "Signal caught: you have the keys of ... for 10 min". When the minutes are over the keys stop working.

Use the device again to turn it off. After a use it needs some time before it works again.

### For the owner

* The owner may read **"Your key fob is acting strange"** when a thief tries (30% chance by default)
* Carrying a **Signal blocker** (`signal_blocker`) in the inventory protects every lock and unlock you do. Nothing else is needed: you don't have to use it
* The caught keys are temporary: they stop working by themselves after the minutes the admin set

### For the admin

Open `/vehiclekeys` > **Settings** > **Relay attack**.

| Option | What it does |
| - | - |
| Thieves can catch the signal of keyless cars with a relay device | Turns the relay attack on |
| Device item name | `key_relay` by default |
| Blocker item name | `signal_blocker` by default. Empty: nobody is protected |
| Minigame | The minigame played to catch the signal |
| Seconds of waiting | How long the device listens after a use, 60 s by default |
| Range (meters) | The thief must be this close to the owner and to the car, 25 m by default |
| Minutes the caught keys work | 10 min by default |
| Seconds before the device works again | 120 s by default, counted from when it was turned on |
| Chance the owner notices (%) | 30% by default |
| Police needed online | 0 by default |
| The device is used up after one use | Off by default |
| Players' own cars can be caught too | On by default. Off: only cars nobody owns |

Both items are in [Installation > Items](https://docs.jaksam-scripts.com/vehicles-keys/installation.md#items) and must exist in your inventory with the same names.

> [!NOTE]
>
> The difficulty of the minigame follows **Difficulty by vehicle class** in **Hotwiring**: a super car is harder to catch than a sedan.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.