Skip to content

Installation Guide

Ensure you have the following dependencies installed and running:

  • oxmysql - Database library
  • ox_lib - UI and utility library
  • PolyZone - Zone management system
  • baseevents - FiveM base resource for player events

Download the ars_gangsystem folder and place it in your server’s resources directory:

server-data/resources/[ARS]/ars_gangsystem/

Open shared/config.lua and set your framework:

Config.Framework = 'esx' -- Options: 'esx' or 'qb'

Set your inventory system in shared/config.lua:

Config.Inventory = 'ox_inventory' -- Options: 'default', 'ox_inventory', 'qb-inventory', 'qs-inventory', 'ps-inventory'
Config.InventoryImages = 'nui://ox_inventory/web/images/'

Add the resource to your server.cfg:

ensure oxmysql
ensure ox_lib
ensure PolyZone
ensure baseevents
ensure ars_gangsystem

In shared/config.lua, add admin licenses or use the permissions system:

Config.AdminMenu = {
Command = { Enable = true, String = 'admingangmenu' },
Keybind = { Enable = true, DefaultMapping = 'F10' },
Permissions = { 'admin', 'god' },
License = {
['license:YOUR_LICENSE_HERE'] = true,
}
}

To get a player’s license, use /getlicense command or check your database.

Set which jobs count as police in shared/config.lua:

Config.PoliceJobs = {
['police'] = true,
['sheriff'] = true
}

Import the database schema to create all required tables:

Terminal window
# Import via MySQL command line
mysql -u your_username -p your_database < resources/[ARS]/ars_gangsystem/database.sql
# OR via phpMyAdmin or similar tool
# Open database.sql file and execute the SQL queries

Required tables:

  • ars_gangsystem - Gang data storage (members, ranks, markers, rackets)
  • ars_gangsystem_territories - Territory zones and control points
  • ars_gangsystem_turfwars - Turf war zone definitions
  • ars_gangsystem_turfwar_history - Historical war records

Note: While the resource can create tables automatically, it’s recommended to import the database.sql file to ensure proper table structure and indexing from the start.

The gang system requires a targeting system for interaction with NPCs, markers, and other game elements. Install one of the following:

Targeting SystemInstallationNotes
qtargethttps://github.com/Blumlis/qtargetClassic targeting, widely used
qb-targetIncluded with QBCore frameworkBest for QBCore servers
ox_targethttps://github.com/overextended/ox_targetModern targeting with ox_lib integration

Note: Only one targeting system is required. Ensure your chosen targeting system is installed and started before ars_gangsystem.

The ARS Gang System uses the following inventory items that must exist in your inventory database:

Gang System Items:

  • zipties - Used to restrain other players
  • blindfold - Used to cover a restrained player’s vision
  • cutter - Used to remove zipties

Drug Sale Items:

  • coke_pouch - Selling to NPCs ($700 - $1,100, 50% police alert)
  • meth_pouch - Selling to NPCs ($500 - $800, 60% police alert)
  • weed_pouch - Selling to NPCs ($150 - $400, 80% police alert)

Airdrop Items:

ItemAmountTypical Use
cokebrick1-5High-value drug
codeine1-3Pharmaceutical drug
heroin_brick1-2High-value drug
lsd50-100Hallucinogenic drug
meth_raw1-2Drug ingredient
opium1-4Drug ingredient
shroom1Drug ingredient
xanax1-3Prescription drug
speedball1-2Mixed drug

ESX-based inventories use SQL to add items directly to the database. Run this query in your database:

-- All Required Items (15 items total)
INSERT INTO items (name, label, weight, rare, can_remove) VALUES
('zipties', 'Zipties', 100, 0, 1),
('blindfold', 'Blindfold', 50, 0, 1),
('cutter', 'Cutter', 200, 0, 1),
('coke_pouch', 'Cocaine Pouch', 500, 0, 1),
('meth_pouch', 'Meth Pouch', 400, 0, 1),
('weed_pouch', 'Weed Pouch', 300, 0, 1),
('cokebrick', 'Cocaine Brick', 2000, 0, 1),
('codeine', 'Codeine', 100, 0, 1),
('heroin_brick', 'Heroin Brick', 1500, 0, 1),
('lsd', 'LSD', 50, 0, 1),
('meth_raw', 'Raw Meth', 1000, 0, 1),
('opium', 'Opium', 800, 0, 1),
('shroom', 'Magic Mushrooms', 100, 0, 1),
('xanax', 'Xanax', 50, 0, 1),
('speedball', 'Speedball', 300, 0, 1);

Note: Adjust the table and column names based on your ESX inventory implementation. Some ESX inventories use can_remove while others use canRemove. Check your existing items table structure before running these queries.

ox_inventory/data/items.lua:

['zipties'] = {
label = 'Zipties',
weight = 100,
stack = true,
close = true,
description = 'Used to restrain players.'
}
['blindfold'] = {
label = 'Blindfold',
weight = 50,
stack = true,
close = true,
description = 'Used to cover a player\'s vision.'
}
['cutter'] = {
label = 'Cutter',
weight = 200,
stack = true,
close = true,
description = 'Used to remove zipties.'
}
['coke_pouch'] = {
label = 'Cocaine Pouch',
weight = 500,
stack = true,
close = true,
description = 'A small pouch of cocaine.'
}
['meth_pouch'] = {
label = 'Meth Pouch',
weight = 400,
stack = true,
close = true,
description = 'A small pouch of methamphetamine.'
}
['weed_pouch'] = {
label = 'Weed Pouch',
weight = 300,
stack = true,
close = true,
description = 'A small pouch of marijuana.'
}
['cokebrick'] = {
label = 'Cocaine Brick',
weight = 2000,
stack = true,
close = true,
description = 'A large brick of high-quality cocaine.'
}
['codeine'] = {
label = 'Codeine',
weight = 100,
stack = true,
close = true,
description = 'Pharmaceutical-grade codeine.'
}
['heroin_brick'] = {
label = 'Heroin Brick',
weight = 1500,
stack = true,
close = true,
description = 'A compressed brick of heroin.'
}
['lsd'] = {
label = 'LSD',
weight = 50,
stack = true,
close = true,
description = 'Hallucinogenic tabs.'
}
['meth_raw'] = {
label = 'Raw Meth',
weight = 1000,
stack = true,
close = true,
description = 'Unprocessed methamphetamine crystals.'
}
['opium'] = {
label = 'Opium',
weight = 800,
stack = true,
close = true,
description = 'Raw opium paste.'
}
['shroom'] = {
label = 'Magic Mushrooms',
weight = 100,
stack = true,
close = true,
description = 'Psychedelic mushrooms.'
}
['xanax'] = {
label = 'Xanax',
weight = 50,
stack = true,
close = true,
description = 'Prescription anxiety medication.'
}
['speedball'] = {
label = 'Speedball',
weight = 300,
stack = true,
close = true,
description = 'A mix of cocaine and heroin.'
}

qb-core/shared/items.lua:

zipties = {
name = 'zipties',
label = 'Zipties',
weight = 100,
type = 'item',
image = 'zipties.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Used to restrain players.'
}
blindfold = {
name = 'blindfold',
label = 'Blindfold',
weight = 50,
type = 'item',
image = 'blindfold.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Used to cover a player\'s vision.'
}
cutter = {
name = 'cutter',
label = 'Cutter',
weight = 200,
type = 'item',
image = 'cutter.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Used to remove zipties.'
}
coke_pouch = {
name = 'coke_pouch',
label = 'Cocaine Pouch',
weight = 500,
type = 'item',
image = 'coke_pouch.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A small pouch of cocaine.'
}
meth_pouch = {
name = 'meth_pouch',
label = 'Meth Pouch',
weight = 400,
type = 'item',
image = 'meth_pouch.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A small pouch of methamphetamine.'
}
weed_pouch = {
name = 'weed_pouch',
label = 'Weed Pouch',
weight = 300,
type = 'item',
image = 'weed_pouch.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A small pouch of marijuana.'
}
cokebrick = {
name = 'cokebrick',
label = 'Cocaine Brick',
weight = 2000,
type = 'item',
image = 'cokebrick.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A large brick of high-quality cocaine.'
}
codeine = {
name = 'codeine',
label = 'Codeine',
weight = 100,
type = 'item',
image = 'codeine.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Pharmaceutical-grade codeine.'
}
heroin_brick = {
name = 'heroin_brick',
label = 'Heroin Brick',
weight = 1500,
type = 'item',
image = 'heroin_brick.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A compressed brick of heroin.'
}
lsd = {
name = 'lsd',
label = 'LSD',
weight = 50,
type = 'item',
image = 'lsd.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Hallucinogenic tabs.'
}
meth_raw = {
name = 'meth_raw',
label = 'Raw Meth',
weight = 1000,
type = 'item',
image = 'meth_raw.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Unprocessed methamphetamine crystals.'
}
opium = {
name = 'opium',
label = 'Opium',
weight = 800,
type = 'item',
image = 'opium.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Raw opium paste.'
}
shroom = {
name = 'shroom',
label = 'Magic Mushrooms',
weight = 100,
type = 'item',
image = 'shroom.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Psychedelic mushrooms.'
}
xanax = {
name = 'xanax',
label = 'Xanax',
weight = 50,
type = 'item',
image = 'xanax.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Prescription anxiety medication.'
}
speedball = {
name = 'speedball',
label = 'Speedball',
weight = 300,
type = 'item',
image = 'speedball.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A mix of cocaine and heroin.'
}

Note: qs-inventory and ps-inventory use the same format as qb-inventory. Use the examples above and adjust the file path to your inventory’s config location.

Restart your server to load the resource:

restart ars_gangsystem

After installation:

  1. Start your server
  2. Join as a player
  3. Press F6 to open the gang menu
  4. Create a gang through the admin menu (F10)

When updating to a new version:

  1. Stop the server
  2. Replace the ars_gangsystem folder with the new version
  3. Review shared/config.lua for any new configuration options
  4. Restart the server
  5. Database migrations are handled automatically
  • Check that all dependencies (oxmysql, ox_lib, PolyZone, baseevents) are running
  • Verify the resource path in server.cfg is correct
  • Check server console for error messages
  • Ensure oxmysql is properly configured with your database credentials
  • Verify MySQL server is running and accessible
  • Check that the database user has CREATE and INSERT permissions
  • Verify Config.Framework matches your installed framework
  • Check that ESX/QBCore is running before ars_gangsystem
  • Ensure framework exports are available
  • Verify ox_lib is started and working
  • Check browser console (F8 in-game) for JavaScript errors
  • Ensure NUI callbacks are not blocked by other resources
  • Verify PolyZone is started
  • Check Config.DebugMode = true to see zone debug lines
  • Ensure territory zones are created in the database

For issues or questions, refer to the configuration documentation or contact support through the original resource page.


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.