B&W Safezone

CAS-SAFEZONE Documentation

Advanced Safezone System for RedM (VORP Framework)


Introduction

CAS-SAFEZONE is a fully featured safezone management system designed for RedM servers running the VORP framework. It provides permanent and temporary safezones, anti-abuse systems, combat tagging, modern UI, admin tools, and a highly structured Discord logging system.

This documentation explains installation, configuration, map integration, commands, features, and developer hooks.


1. Requirements

RedM Server

Must be running the latest RedM build.

Framework

VORP Core (required)

Webmap (Optional but supported)

CAS-SAFEZONE supports live map interaction through: https://github.com/codeaftersex/RDR2CollectorsMap/tree/main

This allows NUI admin panel map previews and live coordinate positioning.

• vorp_core • vorp_character • RDR2CollectorsMap


2. Installation

Step 1: Add the resource

Place the folder in your server resources directory and name it:

Step 2: Ensure dependencies

In your server.cfg:

Make sure VORP loads before CAS-SAFEZONE.

Step 3: Configure the script

Open:

Modify the settings according to your server's needs (explained in detail below).

Step 4: WebMap Setup

If you want to enable admin UI live map preview:

  1. Add it to your resources directory.

  2. Configure CAS-SAFEZONE:

  1. Add permissions if needed.


3. Configuration Guide

Below is an explanation of every config section.


3.1 Locale

Supported languages by default:

Code
Language

en

English

de

German

fr

French

You can add your own by extending the locale files.


3.2 Safezone Types

Three behavior types are included:

Type
Description

hard

Full protection. No damage, no weapons, no melee, no lasso.

soft

Moderate protection. Weapons allowed but damage prevented.

rp

Flexible protection for RP areas.

Each type has its own settings inside:

Example:


3.3 Permanent Safezones

You can define as many permanent safezones as you want:

Available fields:

Field
Type
Description

name

string

Safezone display name

type

string

hard, soft, or rp

coords

vector3

Center position

radius

float

Size of the safezone


3.4 Temporary Safezones

Admins can create runtime safezones via command and UI.

Temporary zones support duration:

This creates a temporary safezone that expires in 120 seconds.

Temporary zones are stored in memory and synced to all players.


3.5 Abuse System

Explosive weapons defined here:


3.6 Exempt Jobs

Whitelist jobs that bypass safezone restrictions.


3.7 UI Settings

You can customize banner text and colors per locale inside NUI locale files.


3.8 Admin Settings

Optional ACE permissions in server.cfg:


3.9 Discord Logging

All logs are beautifully formatted embeds with:

• Player name • Identifiers (steam, license, discord, ip) • Position • Zone name • Abuse counters • Raw JSON of the event

If no webhook is set, logs fall back to server console.


4. Commands

Command
Description

/managesafezone

Opens NUI admin panel

/addsafezone [type] [duration] [name]

Creates a temporary safezone

/removesafezone [id]

Removes a temporary safezone

/listsafezones

Lists permanent and temporary zones

/tpsafezone [name]

Teleports to zone center

/cas_safezone_testlogs

Sends mock data logs to Discord

Example usage:

Creates a 5-minute hard safezone.


5. Admin Panel (NUI)

The admin UI provides tools to manage safezones visually.

Features:

• List all safezones (permanent + temporary) • Create new safezones • Edit existing safezones • Delete temporary safezones • Live map preview (if RDR2CollectorsMap is installed) • Safezone radius and position display • Zone type and expiration time display

map integration requires:


6. Player Experience

Players see:

• Enter Safezone banner • Leave Safezone banner • Blurred screen inside zone (optional) • Notifications for:

  • Combat tag

  • Explosive restrictions

  • Attempts to abuse the zone


7. Developer API

Add temporary safezone

Remove temporary safezone

Get list of temp safezones


8. Logging Events

The following server events are logged automatically when enabled:

Event
Trigger

cas-safezone:logCombatTag

Player enters zone while combat tagged

cas-safezone:logShootingFromInside

Player attempts to shoot inside zone

cas-safezone:logShootingFromOutside

Player shoots into the zone

cas-safezone:logExplosiveAbuse

Player attempts explosive usage inside zone

Each event sends: • Title (localized) • Description • Player identifiers • Position coordinates • Zone name • Abuse counters • Raw JSON


9. Troubleshooting

Banners not showing

Ensure NUI is not blocked by another resource.

Safezone not activating

Check: • Zone radius • Type settings • Combat tag enabled • Player job exempt list

Discord logs not working

Ensure: • Valid webhook • HTTPS used • No firewall blocking outbound requests

Map not showing in admin panel

Ensure: • RDR2CollectorsMap is installed • Config.MapResourceName matches resource folder name • Config.MapHtmlFile matches map HTML file


Last updated