# DXS Danger Zone

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

### Installation

1. Copy the `dxs_zone` folder to your server's `resources` directory.
2. Add `ensure dxs_zone` to your `server.cfg` file.
3. Configure the zones and other settings in the `config.lua` file.
4. Restart your server.

### Configuration

The main configuration file is `config.lua`. Here you can define the danger zones, NPC settings, and notification preferences.

#### Zones

You can add or modify zones in the `Config.Zones` table. Each zone has the following properties:

* `label`: The name of the zone.
* `coords`: The center coordinates of the zone.
* `radius`: The radius of the zone.
* `style`: The blip style for the zone.
* `enterMsg`: The message to display when a player enters the zone.
* `leaveMsg`: The message to display when a player leaves the zone.
* `npcOverrides`: A table to override the default NPC settings for this specific zone.

#### NPC Settings

The `Config.NPC` table contains the default settings for the NPCs. These settings can be overridden on a per-zone basis.

* `enabled`: Enable or disable NPC spawning.
* `delayMs`: The delay before the first wave of NPCs spawns.
* `staggerMs`: The delay between each NPC spawn within a wave.
* `emptyWaveDelayMs`: The delay between waves when the zone is empty.
* `attackOnlyInside`: If true, NPCs will only attack players inside the zone.
* `leashReturn`: If true, NPCs will return to the zone's center if they have no target.
* `spawnDistance`: The distance from the player at which NPCs will spawn.
* `maxRidersPerZone`: The maximum number of NPCs to spawn in a wave.
* `accuracy`: The accuracy of the NPCs (0-100).
* `cleanupOnDeath`: If true, dead NPCs and their horses will be cleaned up.
* `weapons`: A list of weapons for the NPCs.
* `models`: A list of ped and horse models for the NPCs.

#### Notifications

The `Config.Notify` table allows you to configure the notifications.

* `useVorp`: If true, the script will use VORP notifications.
* `duration`: The duration of the notifications in milliseconds.
* `titles`: The titles for the enter, leave, and wave notifications.
* `styles`: The styles (icon, color) for the notifications.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dxs-scripts.gitbook.io/home/documentation/redm/dxs-danger-zone.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
