CS_RESTRICTEDZONE

A restricted zone system allowing admins and certain jobs to create temporary or permanent restricted areas, with notifications, blips, and webhook logging.


Installation

start CS_RESTRICTEDZONE

Configuration

Config.lua

This configuration file defines how restricted zones are created, managed, and deleted.

General Settings
  • ServerAnnounce: true / false – Determines whether announcements are executed server-side or client-side.

  • WebhookEnabled: true / false – Enable or disable Discord webhook logging.

  • command: Command to create a zone. Example: "rz"

  • clearcommandenabled: true / false – Enable command to delete zones manually.

  • clearcommand: Command to delete zones. Example: "rzdel"

  • ClearCommandGroups: Groups allowed to use the clear command. Example: {"owner", "superadmin"}

  • AutomaticDelete: true / false – Delete zones automatically after a set time.

  • AutomaticDeleteTime: Milliseconds until automatic deletion. Example: 600000 (10 minutes)

Zone Settings
  • minRadius / maxRadius: Minimum and maximum allowed radius for a restricted area. Example: 1 / 10

  • MenuAlign: Position of menu UI. Example: "top-left"

  • MaxZonesPerJob: Maximum zones a job can create. Example: 1

  • OnlySameJobCanDelete: true / false – Restrict deletion to the job that created the zone.

Blip Settings
  • Blip: Display blip for restricted zones

    • ShowBlip: true / false

    • sprite: Icon ID. Example: 161

    • color: Blip color. Example: 1

    • scale: Blip scale. Example: 1.0

  • AreaBlip: Visual representation of zone

    • Multiplier: Size multiplier. Example: 10

    • Alpha: Transparency. Example: 150

    • Color: Color ID. Example: 1

Allowed Jobs

Jobs with minimum ranks that can create restricted zones. Example:

CS.AllowedJobs = {
police = { minrank = 5 },
ambulance = { minrank = 3 },
}

Notifications & Locales

Notification System
  • CustomClientSideNotification(title, msg, type) → Uses RiP-Notify or your custom notifications Script to display notifications

  • AnnounceFunction(title, msg, src) → Called when a zone is created (server or client side)

  • AnnounceFunctionDelete(title, msg) → Called when a zone is deleted

Locale Support

English (EN) messages included for:

  • Command errors (wrong job/rank)

  • Menu labels

  • Help notifications

  • Announcements

  • Webhook messages


Webhooks
Webhook = {}
Webhook.Link = "https://discord.com/api/webhooks/1145057864688345088/Izq6zO7rjsivLWyK2TyySkeGK91MQsXgeJyz1x0SoFzg_8D1Xixqldj_PMfXDUaj4t29"
  • WebhookZoneCreated → Logs creation of a restricted zone with job, location, and radius

  • WebhookZoneDeleted → Logs deletion of a zone

  • WebhookZonesClearedAdmin → Logs when an admin clears all zones

Tip: Leave the URL as an empty string "" if you do not want the webhook to trigger for that event.

Features
  • Create restricted zones with configurable radius and blips

  • Job and rank restrictions for zone creation/deletion

  • Automatic deletion of zones after a set timer

  • Notifications via RiP-Notify

  • Server-side or client-side announcements

  • Discord webhook logging

  • English locale support


Support

If you have any further questions, open a ticket on our discord server: discord.gg/core-services

Last updated

Was this helpful?