DXS Danger Zone

A danger zone script for RedM (VORP), where hostile NPCs spawn in waves to attack players within defined zones.

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.

Last updated