A FiveM resource that allows administrators to create temporary safe zones with automatic restrictions.
Version 2.0 - Remade with ox_lib and dual framework support (QBCore/ESX)
This resource allows administrators to set temporary admin zones that automatically:
- Disable weapon firing (inside the zone only)
- Disable melee attacks (inside the zone only)
- Apply speed limiter to vehicles (inside the zone only)
- Display on-screen notifications when entering/leaving zones
- Show temporary blips on the map
- Send Discord webhook notifications when zones are created/removed
- Auto-remove zones when the admin disconnects
Upon removing zones, the resource:
- Removes the temporary blips
- Re-enables shooting and violence
- Notifies players of zone clearance
- Removes the speed limit
- ox_lib - Required
- qb-core - Required if using QBCore
- es_extended - Required if using ESX
- Download and place the
donk_adminzonefolder in yourresourcesdirectory - Ensure
ox_libis installed and started before this resource - Add to your
server.cfg:ensure ox_lib ensure donk_adminzone - Configure the resource in
config.lua(see Configuration section) - Restart your server
Open config.lua and configure the following:
Config.Framework = 'qb' -- Change to 'esx' to use ESX frameworkConfig.AdminGroups = {"admin", "god"} -- Groups that can use admin zone commandsConfig.DisableViolence = true -- Disable shooting/melee in admin zones
Config.BlipRadius = 100.0 -- Zone radius in meters
Config.BlipColor = 1 -- Blip color (1 = Red)
Config.BlipSprite = 487 -- Blip sprite ID
Config.BlipName = "Temp Safe Zone" -- Blip name
Config.MaxSpeed = 20 -- Maximum speed in MPH inside zone
Config.ZoneCheckDistance = 100.0 -- Distance to check for zone proximityConfig.UseWebhook = true -- Enable/disable webhook logging
Config.Webhook = "YOUR_WEBHOOK_URL" -- Discord webhook URL
Config.WebhookColor = 16711680 -- Discord embed color (red)/setgz- Create a temporary admin zone at your current location/cleargz- Clear your temporary admin zone
Note: Only players with admin permissions can use these commands.
You can bind these commands to keys using FiveM's keybind system:
- Press
ESC> Settings > Key Bindings > FiveM - Find the commands and assign your preferred keys
This resource supports both QBCore and ESX frameworks. Simply change the Config.Framework setting in config.lua:
For QBCore:
Config.Framework = 'qb'For ESX:
Config.Framework = 'esx'The resource will automatically use the appropriate framework functions.
- Admin uses
/setgzcommand - A zone is created at their current location
- All players within the zone radius:
- See a blip on their map
- Get on-screen notifications
- Cannot use weapons (if enabled)
- Have their vehicle speed limited
- Admin uses
/cleargzto remove the zone - If admin disconnects, their zone is automatically removed
- Original Author: donk
- Remade with ox_lib and dual framework support
- Based on the original qb-adminzone
- Remade with ox_lib by the community
This project maintains the original licensing terms.