> ## 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.

# Car alarms

> Install an alarm on your car and see what each of the 4 levels does when a thief breaks in

Players can install an **alarm** on their own car. There are 4 levels, and each level does everything the previous one does, plus something more.

## The 4 levels

| Level | Item | What happens when the alarm goes off |
| - | - | - |
| 1 | `vehicle_alarm_1` | The siren sounds |
| 2 | `vehicle_alarm_2` | Siren, and the owner reads "Vehicle alarm activated" with a mark on the map where it went off |
| 3 | `vehicle_alarm_3` | Like level 2, and the owner sees the car move on the map ("Stolen vehicle") for a while |
| 4 | `vehicle_alarm_4` | Like level 3, and the police see the car on the map too |

> [!NOTE]
>
> The warnings and the map marks reach the owner only when they are online. The police are the jobs listed in `POLICE_JOBS_NAMES` in `vehicles_keys/integrations/sv_integrations.lua` (`police` and `sheriff` by default).

## When the alarm goes off

* Somebody **breaks a window** of the car
* Somebody **hotwires** the car after picking its lock
* A thief **fails a minigame** on the car, with the chance the admin set (hotwire, key emulator, key programmer)
* Somebody hotwires the car after opening it with the **key emulator**, when "Opening is silent" is off

An alarm also makes the [key emulator](https://docs.jaksam-scripts.com/vehicles-keys/guides/key-emulator.md) harder and can warn the owner while a thief [copies the key](https://docs.jaksam-scripts.com/vehicles-keys/guides/key-cloning.md).

## For the player

**1. Get an alarm item**

Buy or receive one of the `vehicle_alarm_1` to `vehicle_alarm_4` items.

**2. Stand next to your car**

Within 3 m of a car you own.

**3. Use the item**

Use it from your inventory. You see **Installing alarm...** for a few seconds. The item is used up and the alarm stays on the car, also after a restart.

Using a new alarm item replaces the old level.

> [!NOTE]
>
> After the alarm went off, your remote says "You have to enter in the vehicle one time to do that". Get in your car once and the remote works again.

## For the admin

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

| Option | What it does |
| - | - |
| Alarm items (one item name per level) | The item name of each level. They must exist in your inventory |
| Jobs that can install alarms | These jobs can install an alarm on any car, for example a mechanic. Everybody else only on their own cars. **All jobs allowed** (the default) lets anybody install on any car |
| Seconds to install alarm | How long the installation takes |
| Acoustic alarm duration (seconds) | How long the siren sounds |
| Mark where the alarm went off (alarm level 2 and up) | Map icon, color, size and how long the mark stays |
| Live tracker on the map (alarm levels 3 and 4) | Map icon, color, size, how often it moves and how long it lasts |

The alarm items are listed in [Installation > Items](https://docs.jaksam-scripts.com/vehicles-keys/installation.md#items).

> [!TIP]
>
> An NPC car has no alarm level. When it is broken into, the police may be told, with the chance set in **Chance the police are alerted when an NPC car is stolen (%)**.


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