Troubleshooting
Common Issues
Safezone not activating when entering the area
Possible causes:
- Zone is deactivated (check
data/zone_states.json) - Framework not fully loaded before the resource starts
Config.CheckIntervalis set too high
Fix:
- Check if the zone is active:
/listsafezones
Look for [Active] or [Inactive] tags.
- Ensure
f5_safezonesstarts after your framework inserver.cfg:
ensure qb-core # or qbx_core / es_extended
ensure f5_safezones
- Try lowering the check interval:
Config.CheckInterval = 100 -- Default, lower = more responsive
Players can still deal damage inside safezones
Possible causes:
- Zone has
enableInvincibilityset tofalse - Another resource is overriding entity proofs
- Zone has
collisionDisabledset totrue
Fix:
- Check zone protection settings:
enableInvincibility = true,
enableGhosting = true,
preventVehicleDamage = true,
collisionDisabled = false,
-
Check for resource conflicts — any script that sets
SetEntityInvincible(ped, false)on a timer will override safezone protection. -
Enable debug mode to verify the zone boundaries:
/szdebug
Vehicles not ghosting (collision still active)
Possible causes:
enableGhostingisfalsefor the zonecollisionDisabledistrue(disables entire collision system)Config.CollisionSystem.rangeis too small
Fix:
- Verify ghosting is enabled for the zone
- Increase collision range if needed:
Config.CollisionSystem = {
range = 100.0, -- Increase if vehicles outside this range aren't ghosted
}
- Check if the vehicle is outside the scan range — only vehicles within
rangemeters are processed
Admin panel won't open
Possible causes:
- Player doesn't have the required ACE permissions
- The
/szadmincommand is disabled in config - NUI is not loading (check F8 console for errors)
Fix:
- Verify admin permissions — try from the server console:
listsafezones
If this works but /szadmin doesn't, it's a permission issue.
- Check that the command is enabled:
Config.Commands.szadmin = {
name = 'szadmin',
active = true,
}
- Grant the proper ACE permission:
add_ace group.admin safezones.admin allow
Zones disappearing after server restart
Possible causes:
- Custom zones file (
data/zones.json) is corrupted or permissions error - The
data/directory doesn't exist or isn't writable
Fix:
- Check if
data/zones.jsonexists and contains valid JSON - Check the
data/zones.json.backupfile — restore from it if the main file is corrupted - Ensure the server process has write permissions to the
data/directory - Check server console for error messages about file operations
Zone markers not rendering
Possible causes:
showMarkerisfalsefor the zone- Player is outside
renderDistance - Marker type is set to an invalid value
Fix:
- Toggle marker visibility:
/sztoggle
- Check render distance — move closer to the zone center
- Verify marker type is between 1-6:
Config.DefaultMarker = {
type = 1, -- Must be 1-6
}
"Access denied" for all admin commands
Possible causes:
- No matching ACE permission
- Framework permission level not granted
Fix:
Check which permission system you use:
- ACE Permissions
- QBCore
- ESX
- QBox Core
- txAdmin
# Grant specific permission
add_ace identifier.steam:110000xxx safezones.admin allow
# Or grant to admin group
add_ace group.admin safezones.admin allow
add_principal identifier.steam:110000xxx group.admin
Ensure the player has admin or god permission in QBCore:
QBCore.Functions.AddPermission(source, 'admin')
Ensure the player has admin or superadmin group in ESX:
-- In your ESX admin management
xPlayer.setGroup('admin')
QBox uses ACE permissions only. Grant via server.cfg:
add_ace identifier.steam:110000xxx safezones.admin allow
If using txAdmin, the command.tx ACE is automatically checked:
# txAdmin usually sets this automatically
add_ace identifier.steam:110000xxx command.tx allow
Server-side position verification rejecting valid entries
The server verifies player positions with a 5-unit tolerance. If players are frequently being rejected:
- Check for high network latency on your server
- The issue may be caused by teleportation scripts that move players just before they enter a zone
- Check server console for
Rejected safezone entrymessages with position data
Performance Issues
High CPU usage from safezones
- Increase check intervals:
Config.CheckInterval = 200 -- Increase from 100ms
Config.Performance.updateIntervals = {
playerCache = 1000, -- Increase from 600ms
markerList = 2000, -- Increase from 1000ms
collisionCheck = 800, -- Increase from 450ms
}
- Reduce collision range:
Config.CollisionSystem.range = 50.0 -- Reduce from 100m
- Disable marker effects:
Config.DefaultMarker.pulsing = false
Config.DefaultMarker.bobbing = false
Config.DefaultMarker.rotating = false
Config.DefaultMarker.colorShift = false
- Use render distance limits:
renderDistance = 80.0, -- Don't render markers from far away
FPS drops when inside a safezone with many players
The collision system processes all nearby vehicles and players each tick. For busy areas:
- Increase
collisionCheckinterval - Reduce
Config.CollisionSystem.range - If ghosting is not needed, disable it per-zone:
enableGhosting = false
Debug Mode
Enable debug mode to diagnose issues:
Config.Debug = true
This outputs detailed information about:
- Zone loading and validation
- Player enter/exit events with position data
- Collision system entity counts
- Network event processing
- Admin permission checks
Selective Debugging
Disable noisy categories to focus on specific issues:
Config.DebugCategories = {
INIT = false, -- Disable startup noise
ZONE = true, -- Keep zone info
COLLISION = false, -- Disable collision spam
NETWORK = true, -- Keep network events
ADMIN = true, -- Keep admin events
ERROR = true, -- Always keep errors
}
Still Need Help?
Open a ticket on our Discord server with:
- Your framework (QBCore / QBox / ESX) and version
- Server build number
- F8 console output (client-side)
- Server console output
- Your
config.lua(remove sensitive ACE data) - Steps to reproduce the issue
See Also
- Installation — verify your setup step by step
- Configuration — check all config options
- Debug & Logging — enable detailed diagnostics
- FAQ — common questions about all F5 Studio scripts