Skip to content

Configuration

This guide explains all configuration options available in shared/main.lua for ARS SafeZone.

Config.Debug = false

When enabled, debug messages print to the console and zone polygons are rendered in-game with debug colors. Use this when creating zones or troubleshooting issues.

Config.Framework = 'auto'

Choose which framework the script should use:

  • 'auto' - Automatically detect ESX or QBCore (recommended)
  • 'esx' - Force ESX framework
  • 'qb' - Force QBCore framework
Config.Commands = {
createsafezone = 'createsafezone',
deletesafezone = 'deletesafezone',
zonesetting = 'zonesetting',
}

Customize the command names for admin functions. Change these values to avoid conflicts with other resources.

Configure three different methods for granting admin access to safe zone management.

Config.AdminWithGroup = {
['admin'] = true,
['god'] = true,
}
  • Works with QBCore’s permission system
  • In ESX, uses xPlayer.getGroup() to check admin status
  • Add your server’s admin groups as keys with true as values
Config.AdminWithLicense = {
['license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'] = true,
}
  • Uses the player’s rockstar license identifier
  • Add your admins’ full license strings (found in server.log or through other admin tools)
  • Format must include the license: prefix
Config.AdminWithIdentifier = {
['xxxxxxxx'] = true,
}
  • Uses the framework’s character identifier
  • For ESX, this is the character identifier from the database
  • For QBCore, this is the citizen ID
  • Use this method when you need to grant admin access to specific characters only

Tip: You can use multiple permission methods simultaneously. The script checks each method in order.

Config.AlertStyle = {
icon = 'hand',
position = 'top-center',
textColor = 'white',
borderRadius = 5,
backgroundColor = 'rgb(187 72 72)',
}

Customize the appearance of notification alerts shown to players:

  • icon: Font Awesome icon name (without fa- prefix)
  • position: Alert position on screen (top-center, top-left, top-right, bottom-center, bottom-left, bottom-right, center)
  • textColor: CSS color value for text
  • borderRadius: Border radius in pixels
  • backgroundColor: CSS color value for background (can be hex, rgb, rgba, or named colors)
Config.HideAlertAfterDelay = false
Config.HideAlertDelay = 6
  • HideAlertAfterDelay: Automatically hide alerts after the delay
  • HideAlertDelay: Time in seconds before alerts are hidden (if enabled)
Config.SpeedUnit = 'kmh'

Choose the unit for displaying and setting speed limits:

  • 'kmh' - Kilometers per hour
  • 'mph' - Miles per hour

The script automatically sets the conversion factor:

if Config.SpeedUnit == 'mph' then
Config.SpeedConversionFactor = 2.237 -- Convert m/s to mph
else
Config.SpeedConversionFactor = 3.6 -- Convert m/s to km/h
end
Config.WhitelistedWeapons = {
--[`weapon_pistol`] = true,
--[`weapon_combatpistol`] = true,
}

Weapons listed here are allowed in all safe zones (when allowWhitelistedWeapons is enabled for a zone). Uncomment and add weapon hash keys to whitelist specific weapons for all players.

Config.WhitelistedJobWeapons = {
police = {
[`weapon_stungun`] = { 0, 1, 2, 3, 4 },
[`weapon_combatpistol`] = { 2, 3, 4 },
},
ambulance = {
[`weapon_stungun`] = { 0, 1, 2, 3, 4 },
},
}

Allows specific weapons for specific job grades in safe zones:

  • First level: Job name (police, ambulance, etc.)
  • Second level: Weapon hash
  • Value: Array of allowed grades (0 is lowest, higher numbers are higher ranks)

Example: Police can use stun guns at grades 0-4, but only grades 2+ can use combat pistols.

These options apply as defaults when creating new safe zones. They can be overridden per zone.

Config.DefaultSafeZoneOptions = {
disableWeapons = true,
disableVehicleDamage = true,
disablePlayerInvisible = false,
allowWhitelistedWeapons = true,
allowWhitelistedJobWeapons = true,
enableVehicleSpeedLimit = false,
vehicleSpeedLimit = 30,
entryMessage = 'You have entered a safe zone',
exitMessage = 'You have left a safe zone',
}
OptionTypeDescription
disableWeaponsbooleanDisable all weapons inside the zone
disableVehicleDamagebooleanPrevent vehicles from taking damage
disablePlayerInvisiblebooleanMake players invincible (note: misnamed option)
allowWhitelistedWeaponsbooleanAllow weapons from Config.WhitelistedWeapons
allowWhitelistedJobWeaponsbooleanAllow weapons from Config.WhitelistedJobWeapons
enableVehicleSpeedLimitbooleanEnforce speed limit for vehicles
vehicleSpeedLimitnumberSpeed limit value in configured unit
entryMessagestringNotification when entering the zone
exitMessagestringNotification when leaving the zone

Note: This guide is written by a third party. If you find any incorrect or outdated information, please contact us on Discord so we can update it for you.