F5 StudioF5 Studio
Skip to main content

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.CheckInterval is set too high

Fix:

  1. Check if the zone is active:
/listsafezones

Look for [Active] or [Inactive] tags.

  1. Ensure f5_safezones starts after your framework in server.cfg:
server.cfg
ensure qb-core   # or qbx_core / es_extended
ensure f5_safezones
  1. Try lowering the check interval:
config.lua
Config.CheckInterval = 100 -- Default, lower = more responsive

Players can still deal damage inside safezones

Possible causes:

  • Zone has enableInvincibility set to false
  • Another resource is overriding entity proofs
  • Zone has collisionDisabled set to true

Fix:

  1. Check zone protection settings:
enableInvincibility = true,
enableGhosting = true,
preventVehicleDamage = true,
collisionDisabled = false,
  1. Check for resource conflicts — any script that sets SetEntityInvincible(ped, false) on a timer will override safezone protection.

  2. Enable debug mode to verify the zone boundaries:

/szdebug

Vehicles not ghosting (collision still active)

Possible causes:

  • enableGhosting is false for the zone
  • collisionDisabled is true (disables entire collision system)
  • Config.CollisionSystem.range is too small

Fix:

  1. Verify ghosting is enabled for the zone
  2. Increase collision range if needed:
config.lua
Config.CollisionSystem = {
range = 100.0, -- Increase if vehicles outside this range aren't ghosted
}
  1. Check if the vehicle is outside the scan range — only vehicles within range meters are processed

Admin panel won't open

Possible causes:

  • Player doesn't have the required ACE permissions
  • The /szadmin command is disabled in config
  • NUI is not loading (check F8 console for errors)

Fix:

  1. Verify admin permissions — try from the server console:
listsafezones

If this works but /szadmin doesn't, it's a permission issue.

  1. Check that the command is enabled:
config.lua
Config.Commands.szadmin = {
name = 'szadmin',
active = true,
}
  1. Grant the proper ACE permission:
server.cfg
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:

  1. Check if data/zones.json exists and contains valid JSON
  2. Check the data/zones.json.backup file — restore from it if the main file is corrupted
  3. Ensure the server process has write permissions to the data/ directory
  4. Check server console for error messages about file operations

Zone markers not rendering

Possible causes:

  • showMarker is false for the zone
  • Player is outside renderDistance
  • Marker type is set to an invalid value

Fix:

  1. Toggle marker visibility:
/sztoggle
  1. Check render distance — move closer to the zone center
  2. Verify marker type is between 1-6:
config.lua
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:

server.cfg
# 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

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 entry messages with position data

Performance Issues

High CPU usage from safezones

  1. Increase check intervals:
config.lua
Config.CheckInterval = 200         -- Increase from 100ms
Config.Performance.updateIntervals = {
playerCache = 1000, -- Increase from 600ms
markerList = 2000, -- Increase from 1000ms
collisionCheck = 800, -- Increase from 450ms
}
  1. Reduce collision range:
config.lua
Config.CollisionSystem.range = 50.0  -- Reduce from 100m
  1. Disable marker effects:
config.lua
Config.DefaultMarker.pulsing = false
Config.DefaultMarker.bobbing = false
Config.DefaultMarker.rotating = false
Config.DefaultMarker.colorShift = false
  1. 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:

  1. Increase collisionCheck interval
  2. Reduce Config.CollisionSystem.range
  3. If ghosting is not needed, disable it per-zone: enableGhosting = false

Debug Mode

Enable debug mode to diagnose issues:

config.lua
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.lua
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