[ESX/QB] AFK Safe Zone

A unique zones script with AFK and Safe zone features. It comes with a PolyZone and Radius easy system to control the zones. The AFK zone has advanced features as mentioned below

Features

  • Freeze thirst and hunger in the AFK zone
  • Relief stress in the AFK zone
  • Kick AFK player outside the zone with a timer
  • AFK Bypass system for Admin role
  • Speed limiter for vehicles inside the zone
  • Disables the usage of weapons and melee
  • Control God mode inside each zone
  • Whitelisted jobs get bypass access in a Safe zone
  • PolyZone configuration for zones
  • Default Radius configuration for zones
  • Customizable notification and core object in an unlocked file
  • Turn on/off zone indicator icon
  • Exports are available to link the zones with addon scripts
Configuration
Config = {}

Config.Timelimit = 1200 -- AFK kick TIMER within time in seconds

Config.OxInventory = false --True if you are using the ox_inventory, if not then false

Config.ZoneProperty = {
    ['hospitalzone'] = { --Zone name can be same in the Config.RadiusZone & Config.PolyZone
        PauseFood = true, 
        PauseWater = true, 
        ReduceStress = true, --Stress script is not included in this script. Change the event in cl_function.lua 
        SafeZone = true,
        Speedlimit = 'mph', --'mph', 'kmh' or false
        StressRelief = 0.5, --if ReduceStress = true, Amount of Stress relief per second
        SpeedlimitValue = 30,
        WhitelistJobs = {'ambulance', 'police'} --Jobs to bypass the safezone restriction
    },
    ['policestationzone'] = { --Zone name can be same in the Config.RadiusZone & Config.PolyZone
        PauseFood = true, 
        PauseWater = true, 
        ReduceStress = true, --Stress script is not included in this script. Change the event in cl_function.lua
        SafeZone = true,
        Speedlimit = 'mph', --'mph', 'kmh' or false
        StressRelief = 0.5, --if ReduceStress = true, Amount of Stress relief per second
        SpeedlimitValue = 30,
        WhitelistJobs = {'ambulance', 'police'} --Jobs to bypass the safezone restriction
    },
}

Config.RadiusZone = {
    ['hospitalzone'] = { --Zone name should be from the Config.ZoneProperty Name
        x = 328.9448, y = -587.4816, z = 71.2261, radius = 100.0
    },
}

Config.PolyZone = {
    ['policestationzone'] = { --Zone name should be from the Config.ZoneProperty Name
		Debug = false,
		Zones = {
		    {
			    Coords = {
                    vector2(407.26150512695, -961.58459472656),
                    vector2(493.48638916016, -960.46148681641),
                    vector2(494.44357299805, -1026.5689697266),
                    vector2(405.16998291016, -1032.1352539062)
				},
                minZ = 28.375925064087,
				maxZ = 30.246887207031,
			},
		},
	},

}
Updates
  • v1.0.6 - Added AFK bypass for admin roles, Turn on/off icons, god mode and weapon restriction (31 Aug 2023)
  • v1.0.7 - Fixed /reloadskin exploitation (18 Jan 2024)
  • v1.0.8 - Added whitelist weapon system QB (12 Feb 2024)
  • v1.0.9 - Fixed disable weapon issue QB (26 Feb 2024)
  • v1.1.0 - Fixed icon issue with resolution QB (22 Apr 2024)
  • v1.1.1 - Optimized outside zone (18 Jan 2024)
  • v1.1.2 - Added stress relief function in unlocked file (22 Jan 2024)
  • v1.1.3 - Added whitelist weapon system ESX (12 Feb 2024)
  • v1.1.4 - Fixed disable weapon issue ESX (26 Feb 2024)
  • v1.1.5 - Fixed icon issue with resolution ESX (22 Apr 2024)
  • v1.1.6 - Combined the script to support ESX and QBCore (22 Jun 2024)
  • v1.1.7 - Fixed not weapon disabling issue in a busy area (10 July 2024)

Check out Documentation for Config and Exports: README

Buy Now: https://highqez.tebex.io/

Code is accessible No (Config function is open)
Subscription-based No
Lines (approximately) 700+
Requirements PolyZone, es_extended/qb-core
Support Yes

Our Resources

highqez_phonesnatcherhighqez_cashitemhighqez_vehiclearmoury highqez_crawldead highqez_headgear