Skip to content

Installation Guide

This guide will help you install and configure ARS SafeZone on your FiveM server.

Before installing ARS SafeZone, ensure you have the following dependencies installed:

  • ox_lib - Library for zone management and UI
  • oxmysql - MySQL database library
  • es_extended (ESX) or qb-core (QBCore) - Your chosen framework

Download ARS SafeZone and place it in your server resources directory:

server-data/resources/[your_folder]/ars_safezone/

Note: Do not rename the resource folder. The script checks the resource name and will display an error if renamed.

Execute the database.sql file in your MySQL database to create the required tables:

CREATE TABLE IF NOT EXISTS `ars_safezone` (
`name` VARCHAR(50) PRIMARY KEY,
`label` VARCHAR(50) NOT NULL,
`zone` LONGTEXT DEFAULT NULL,
`options` LONGTEXT DEFAULT NULL
);

Open shared/main.lua and set your framework:

-- Choose your framework: 'esx' or 'qb'
Config.Framework = 'auto'

The script will auto-detect your framework if set to 'auto'. You can also explicitly set it to 'esx' or 'qb'.

Add the resource and its dependencies to your server.cfg:

ensure oxmysql
ensure ox_lib
ensure es_extended
-- OR
ensure qb-core
ensure ars_safezone

The order is important: ensure frameworks and dependencies before ars_safezone.

After installation, verify that the script is working correctly:

  1. Start your server and join as a player
  2. Check that ars_safezone appears in the server console without errors
  3. Join the game and try creating a test safe zone as an admin
  4. Verify that weapon restrictions and other zone options function correctly

To update ARS SafeZone to a new version:

  1. Stop your server
  2. Backup your database table ars_safezone to prevent data loss
  3. Replace the old ars_safezone folder with the new version
  4. Start your server
  5. Check for any new configuration options in shared/main.lua

Warning: Always backup your database before updating, especially if there are schema changes in the new version.

Issue: The resource shows errors in console and does not start.

Fix:

  • Ensure all dependencies (ox_lib, oxmysql) are installed and started before ars_safezone
  • Verify your framework (es_extended or qb-core) is running
  • Check that you have not renamed the resource folder

Issue: Safe zones are not appearing in-game after creation.

Fix:

  • Verify the ars_safezone database table exists and has data
  • Check the MySQL connection in oxmysql
  • Enable debug mode in shared/main.lua: Config.Debug = true
  • Check the server console for zone loading errors

Issue: Admin commands do nothing when used.

Fix:

  • Verify your admin configuration in shared/main.lua
  • Check that you have the correct admin group, license, or identifier configured
  • Ensure you are using the correct command names as configured in Config.Commands

Issue: Players can still use weapons inside safe zones.

Fix:

  • Check that the zone option disableWeapons is enabled
  • Verify that the player’s weapon is not whitelisted in Config.WhitelistedWeapons or Config.WhitelistedJobWeapons
  • Ensure the player is not an admin with bypass permissions enabled for that 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.