[ESX] Synced Sperrzonen / Exclusion zones / Restricted zones for multiple jobs

Exclusion zones / restricted zones for multiple jobs (syned)
You ever wanted to be able to place job restricted exclusion zones for multiple jobs in your server? Now this is possible. You’re able to create as much jobs as you want. For each job you’re able to configure different colors.

Features

  • Multiple Job Zones (e.g police, ambulance, firefighters, …)
  • Zones are synced after reconnect
  • Colors for zones are configureable
  • Add as many jobs as you want
  • Configurable radius for zone
  • Translate as you wish (comes with english and german translation)
  • Configurable notification

Requirements

  • esx_menu_dialog
Pictures

Open dialog (set radius)

Multiple zone colors for multiple jobs

Resource Monitor

Config
Config = {}

Config.ESX = "newesx" -- "newesx" for new getsharedobject or "esx" for old getsharedobject

Config.AddCommand = "addzone"
Config.RemoveCommand = "removezone"

Config.Jobs = {
    {jobname = "police", color = 3},
    {jobname = "ambulance", color = 2},
}
Config.NotificationTime = 5000 -- 5 sec in ms 

Locales = {}

Locales.NotifcationTitle = "EXCLUSION ZONE"
Locales.BlipTitle = "Exclusion Zone"

-- SUCCESS
Locales.CreatedZone = "The exclusion zone has been created"
Locales.RemovedZone = "You have removed the exclusion zone"

-- INFO
Locales.ZoneAnnounce = "A restricted zone has been declared!"
Locales.RmZoneAnnounce = "A restricted zone has been cancelled!"

-- ERROR
Locales.InvalidRadius = "You have specified an invalid radius!"
Locales.NoPermission = "You are not allowed to do that!"
Locales.NoZoneCloseby = "You are not near a exclusion zone!"


function ShowNotification(source, message, type)
    if source ~= nil then -- Serverside
        print(message, type)
        --TriggerClientEvent('dilza-notify:Alert', source, Locales.NotifcationTitle, message, Config.NotificationTime, type)
    else -- Clientside
        print(message, type)
        --exports['dilza-notify']:Alert(Locales.NotifcationTitle, message, Config.NotificationTime, type)
    end
end

Get it now: [ESX] synced exclusion Zones / Sperrzonen for multiple jobs

Code is accessible partly
Subscription-based No
Lines (approximately) Number of lines
Requirements esx, esx_menu_dialog
Support Yes