DXS Danger Zone
- A danger zone script for RedM (VORP), where hostile NPCs spawn in waves to attack players within defined zones.
Overview
- This script allows you to create dangerous areas on your server where players will be attacked by hostile NPCs on horseback. When a player enters a predefined zone, waves of NPCs will spawn and engage in combat with the player. The script is highly configurable, allowing you to customize the zones, NPCs, and notifications.
Features
- Multiple Danger Zones: Define as many danger zones as you want, each with its own settings.
- Wave-based Spawning: NPCs spawn in waves, providing a challenging experience for players.
- Customizable NPCs: Configure NPC models, weapons, accuracy, and combat behavior.
- VORP Integration: The script can use VORP notifications to inform players about entering/leaving zones and incoming waves.
- Map Blips: Each danger zone is marked on the map with a configurable blip.
- Client-side Spawning: NPCs are spawned by clients to minimize server load.
- Automatic Cleanup: Dead NPCs and their horses are automatically removed from the game.
- Leashing: NPCs can be configured to return to the zone's center if no targets are available.
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.
- 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.
Dependency
- Vorp_Core