> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_housing/configuration/security.md).

# Security

Edit `rcore_housing/configs/config.security.lua` to control alarm dispatch, owner SMS, alarm sounds, and the warrant requirement.

## 🚨 Alarm

```lua
Config.Alarm.RequireUpgrade = true
```

When `RequireUpgrade = true`, police dispatch still fires on every alarm event, but the alarm sound and owner SMS only fire if the property has the alarm upgrade installed.

## 👮 Dispatch

```lua
Config.Alarm.Dispatch = {
    Enable           = true,
    DelayPerProperty = 60,
    ShowTime         = 30,
    Jobs             = { 'police', 'sheriff' },
    Blip = {
        Enable  = true,
        Flashes = true,
        Sprite  = 488,
        Colour  = 1,
        Scale   = 1.5,
    },
    Events = {
        [PROPERTY_ALARM_STATE.ON_START]   = true,
        [PROPERTY_ALARM_STATE.ON_SUCCESS] = false,
        [PROPERTY_ALARM_STATE.ON_FAIL]    = false,
    },
}
```

| Option             | Description                                                             |
| ------------------ | ----------------------------------------------------------------------- |
| `DelayPerProperty` | Cooldown (seconds) before the same property can trigger dispatch again. |
| `ShowTime`         | How long (seconds) the dispatch blip stays on the map.                  |
| `Jobs`             | Job names that receive the dispatch alert.                              |
| `Events`           | Which alarm states fire dispatch - `ON_START`, `ON_SUCCESS`, `ON_FAIL`. |

## 🔊 Alarm Sound

```lua
Config.Alarm.AlarmSound = {
    Enable   = true,
    Url      = 'https://rco.re/product/housing/sounds/alarm.mp3',
    Range    = 75.0,
    Duration = 120,
    Events = {
        [PROPERTY_ALARM_STATE.ON_START]   = false,
        [PROPERTY_ALARM_STATE.ON_SUCCESS] = false,
        [PROPERTY_ALARM_STATE.ON_FAIL]    = true,
    },
}
```

| Option     | Description                                                                                      |
| ---------- | ------------------------------------------------------------------------------------------------ |
| `Url`      | URL of the alarm audio file. Replace with a self-hosted mirror if you want to avoid hot-linking. |
| `Range`    | Audible radius in metres.                                                                        |
| `Duration` | Loop duration in seconds (`nil` plays once).                                                     |

## 📱 Owner SMS

```lua
Config.Alarm.Owner = {
    Enable         = true,
    CodeExpiry     = 120,
    MaxPhoneLength = 20,
    MaxPhoneList   = 3,
    Events = {
        [PROPERTY_ALARM_STATE.ON_START]   = true,
        [PROPERTY_ALARM_STATE.ON_SUCCESS] = false,
        [PROPERTY_ALARM_STATE.ON_FAIL]    = false,
    },
}
```

| Option         | Description                                            |
| -------------- | ------------------------------------------------------ |
| `CodeExpiry`   | Seconds before the phone verification PIN expires.     |
| `MaxPhoneList` | Max phone numbers registered per property (default 3). |

The phone integration is configured in the [phone integration](/paid-resources/rcore_housing/integrations/phone.md) page.

## 📜 Warrant

```lua
Config.Warrant = {
    Enable = true,
    Item   = 'warrant',
}
```

When enabled, an officer must carry the warrant item to initiate a raid. See [raid configuration](/paid-resources/rcore_housing/configuration/raid.md).
