Overview
A highly configurable Green Zone script for QBCore, allowing server owners to define safe zones that apply specific restrictions, player state changes, and exemptions based on staff, jobs, or gangs
Features
- Enforce custom restrictions per zone
- Disarm, disable shooting/melee/drive-by shooting, lock inventory and more
- Auto-reset player states: health, stress, hunger, thirst
- Other states such as invincibility, invisibility (reduced alpha), & no ragdoll while inside zones
- Staff, job, and gang-based exemptions from restrictions
- Security checks with optional player drop and logging via
fm-logs
ordiscord
- Full documentation for ease of configuration: Green Zones | Lusty94
Download via GitHub
Documentation
- Documentation for this resource can be found by clicking here
Config Preview
Config.GreenZones = {
['pillbox_ems'] = { -- the key must be unique
info = {-- zone info
debug = true, -- debug zone
coords = vector3(310.3, -590.55, 43.29), -- zone spawn coords
thickness = 10, -- zone thickness
radius = 65, -- zone radius
},
states = { -- define states in this zone
resetHealth = true, -- resets the players health back to 100 in this zone
resetStress = true, -- resets the players stress back to 0 in this zone
resetHunger = true, -- resets the players hunger back to 100 in this zone
resetThirst = true, -- resets the players thirst back to 100 in this zone
invincible = true, -- makes the player invincible in this zone
invisible = true, -- makes the player semi-invisible in this zone
noRagdoll = true, -- stops players ragdolling in this zone
},
restrictions = { -- define restrictions in this zone
disarm = true, -- disarms the player in this zone if carrying a weapon
melee = true, -- disable melee in this zone
shooting = true, -- disable shooting in this zone
driveby = true, -- disables drive by shooting in this zone
vehicleWeapons = true, -- disables vehicle weapons in this zone
lockInventory = true, -- locks the players inventory in this zone
},
ignore = { -- define ignore restrictions in this zone
staff = { -- ignore restrictions for permissions
--add permissions here or leave this empty
'admin',
'god',
'mod',
},
jobs = { -- ignore restrictions for jobs
--add jobs here or leave this empty
'ambulance',
},
gangs = {-- ignore restrictions for gangs
--add gangs here or leave this empty
},
},
},
['mission_row_police'] = { -- the key must be unique
info = { -- zone info
debug = true, -- debug zone
coords = vector3(447.9, -987.77, 30.69), -- zone spawn coords
thickness = 10, -- zone thickness
radius = 50, -- zone radius
},
states = { -- define states in this zone
resetHealth = false, -- resets the players health back to 100 in this zone
resetStress = false, -- resets the players stress back to 0 in this zone
resetHunger = false, -- resets the players hunger back to 100 in this zone
resetThirst = false, -- resets the players thirst back to 100 in this zone
invincible = false, -- makes the player invincible in this zone
invisible = false, -- makes the player semi-invisible in this zone
noRagdoll = false, -- stops players ragdolling in this zone
},
restrictions = { -- define restrictions in this zone
disarm = false, -- disarms the player in this zone if carrying a weapon
melee = false, -- disable melee in this zone
shooting = false, -- disable shooting in this zone
driveby = false, -- disables drive by shooting in this zone
vehicleWeapons = false, -- disables vehicle weapons in this zone
lockInventory = false, -- locks the players inventory in this zone
},
ignore = { -- define ignore restrictions in this zone
staff = { -- ignore restrictions for permissions
--add permissions here or leave this empty
},
jobs = { -- ignore restrictions for jobs
--add jobs here or leave this empty
},
gangs = {-- ignore restrictions for gangs
},
},
},
--add more zones as required
}
Preview
Screenshots
Supported Scripts
Notifications
- qb-core notify✅
- okokNotify✅
- mythic_notify✅
- ox_lib✅
- qs-notify
(experimental - not tested)
Dependencies‼️
Installation
- Ensure all dependencies are started BEFORE this script
- Configure the green zones to suit your server needs
- Define states that are applied in the green zone
- Define restrictions that are applied in the green zone
- Define permissions, job or gang names that are exempt from restrictions in the green zone
Code is accessible | Yes / open source |
Subscription-based | No |
Lines (approximately) | 500+ |
Requirements | qb-core, ox_lib, fm-logs |
Support | Yes |