Installation Guide
This guide walks through installing ars_police on a FiveM server. The script supports both ESX and QBCore frameworks with automatic detection.
Prerequisites
Section titled “Prerequisites”ox_lib- UI library (minimum version 3.0 for radial menu support)oxmysql- MySQL resource for database operations- Framework:
qb-core(QBCore) ores_extended(ESX)
Installation Steps
Section titled “Installation Steps”1. Download and Place Resource
Section titled “1. Download and Place Resource”Download ars_police and place it in your resources folder:
server-data/resources/[ARS]/ars_police/2. Configure Framework
Section titled “2. Configure Framework”Open config.lua and set your framework. The script also auto-detects the framework if qb-core or es_extended is running:
-- For ESXConfig.Framework = 'esx'
-- For QBCoreConfig.Framework = 'qb'3. Configure Inventory System
Section titled “3. Configure Inventory System”Set your inventory type in config.lua:
-- Options: 'ox', 'qb', 'mf', 'qs', 'cheeza', 'custom'Config.Inventory = 'ox'Update the inventory images path to match:
-- For ox_inventoryConfig.InventoryImages = 'nui://ox_inventory/web/images/'
-- For qb-inventoryConfig.InventoryImages = 'nui://qb-inventory/html/images/'
-- For qs-inventoryConfig.InventoryImages = 'nui://qs-inventory/html/images/'4. Database Setup
Section titled “4. Database Setup”Run the SQL file located at _INSTALL/SQL/install.sql in your database:
CREATE TABLE IF NOT EXISTS `ars_police` ( `identifier` varchar(46) NOT NULL, `prison` varchar(50) DEFAULT 'default', `time` int(11) NOT NULL DEFAULT 0, `inventory` longtext NOT NULL, `sentence_date` int(11) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;If you use ESX with an off-duty job, also run _INSTALL/SQL/OffDutyESXJob.sql.
5. Add to Server Config
Section titled “5. Add to Server Config”Add the required dependencies and the resource to your server.cfg:
ensure ox_libensure oxmysqlensure qb-coreensure ars_policeWarning: ars_police must start after your framework and before any resource that depends on it. Renaming the resource folder will cause errors.
6. Configure Police Job Names
Section titled “6. Configure Police Job Names”In config.lua, add your police job names:
Config.PoliceJobNames = { 'police', 'sheriff'}7. Set Up Locations
Section titled “7. Set Up Locations”Police station locations are configured in the locations/ folder. Pre-configured stations include:
| File | Station |
|---|---|
mrpd.lua |
Mission Row PD (LSPD) |
pbpd.lua |
Paleto Bay PD |
sspd.lua |
Sandy Shores PD |
rhpd.lua |
Rockford Hills PD |
ranchopd.lua |
Rancho PD |
Each location defines blip, armory, stash, boss menu, vehicles, clothing room, and clock-in/out points. Create new files in locations/ for custom stations.
Configure Inventory Items
Section titled “Configure Inventory Items”This script uses inventory items for handcuffing, evidence collection, and police equipment. All items must exist in your inventory database.
Required Items
Section titled “Required Items”| Item | Used For |
|---|---|
handcuffs |
Handcuffing players (soft cuff) |
zipties |
Ziptie restraint (alternative to handcuffs) |
handcuffkey |
Removing handcuffs |
cuttingtool |
Removing zipties |
lockpick |
Lockpicking handcuffs (criminal use) |
empty_evidence_bag |
Collecting evidence from scenes |
filled_evidence_bag |
Stored evidence with metadata |
evidence_tools |
Evidence collection kit for UV/fingerprint |
uvlight |
Detecting fingerprints at crime scenes |
spikestrip |
Deploying spike strips |
shield |
Ballistic shield |
ESX (SQL)
Section titled “ESX (SQL)”ESX-based inventories use SQL to add items. Run this query in your database:
INSERT INTO items (name, label, weight, rare, can_remove) VALUES('handcuffs', 'Handcuffs', 100, 0, 1),('zipties', 'Zipties', 50, 0, 1),('handcuffkey', 'Handcuff Key', 10, 0, 1),('cuttingtool', 'Cutting Tool', 50, 0, 1),('empty_evidence_bag', 'Empty Evidence Bag', 100, 0, 1),('filled_evidence_bag', 'Evidence Bag', 200, 0, 0),('evidence_tools', 'Evidence Tools', 200, 0, 1),('uvlight', 'UV Light', 200, 0, 1),('spikestrip', 'Spike Strip', 500, 0, 1),('shield', 'Ballistic Shield', 500, 0, 1);Note: Adjust table and column names based on your ESX inventory implementation. Some use
can_removewhile others usecanRemove.
ox_inventory (Lua)
Section titled “ox_inventory (Lua)”Add to ox_inventory/data/items.lua:
['handcuffs'] = { label = 'Handcuffs', weight = 100, stack = true, close = true, description = 'Handcuffs for restraining suspects.'},['zipties'] = { label = 'Zipties', weight = 50, stack = true, close = true, description = 'Disposable restraints.'},['handcuffkey'] = { label = 'Handcuff Key', weight = 10, stack = true, close = true, description = 'Key for removing handcuffs.'},['cuttingtool'] = { label = 'Cutting Tool', weight = 50, stack = true, close = true, description = 'Tool for cutting zipties.'},['empty_evidence_bag'] = { label = 'Empty Evidence Bag', weight = 100, stack = true, close = true, description = 'Bag for collecting evidence.'},['filled_evidence_bag'] = { label = 'Evidence Bag', weight = 200, stack = false, close = true, description = 'Bag containing collected evidence.'},['evidence_tools'] = { label = 'Evidence Tools', weight = 200, stack = true, close = true, description = 'Kit for forensic evidence collection.'},['uvlight'] = { label = 'UV Light', weight = 200, stack = true, close = true, description = 'Ultraviolet light for detecting fingerprints.'},['spikestrip'] = { label = 'Spike Strip', weight = 500, stack = true, close = true, description = 'Tire-puncturing strip for vehicle stops.'},['shield'] = { label = 'Ballistic Shield', weight = 500, stack = false, close = true, description = 'Protective shield for high-risk situations.'},qb-inventory (Lua)
Section titled “qb-inventory (Lua)”Add to qb-core/shared/items.lua:
handcuffs = { name = 'handcuffs', label = 'Handcuffs', weight = 100, type = 'item', image = 'handcuffs.png', unique = false, useable = true, shouldClose = true, description = 'Handcuffs for restraining suspects.'},zipties = { name = 'zipties', label = 'Zipties', weight = 50, type = 'item', image = 'zipties.png', unique = false, useable = true, shouldClose = true, description = 'Disposable restraints.'},handcuffkey = { name = 'handcuffkey', label = 'Handcuff Key', weight = 10, type = 'item', image = 'handcuffkey.png', unique = false, useable = true, shouldClose = true, description = 'Key for removing handcuffs.'},cuttingtool = { name = 'cuttingtool', label = 'Cutting Tool', weight = 50, type = 'item', image = 'cuttingtool.png', unique = false, useable = true, shouldClose = true, description = 'Tool for cutting zipties.'},empty_evidence_bag = { name = 'empty_evidence_bag', label = 'Empty Evidence Bag', weight = 100, type = 'item', image = 'evidence.png', unique = false, useable = false, shouldClose = false, description = 'Bag for collecting evidence.'},filled_evidence_bag = { name = 'filled_evidence_bag', label = 'Evidence Bag', weight = 200, type = 'item', image = 'evidence.png', unique = true, useable = false, shouldClose = false, description = 'Bag containing collected evidence.'},evidence_tools = { name = 'evidence_tools', label = 'Evidence Tools', weight = 200, type = 'item', image = 'evidence_tools.png', unique = false, useable = false, shouldClose = false, description = 'Kit for forensic evidence collection.'},uvlight = { name = 'uvlight', label = 'UV Light', weight = 200, type = 'item', image = 'uvlight.png', unique = false, useable = true, shouldClose = true, description = 'Ultraviolet light for detecting fingerprints.'},spikestrip = { name = 'spikestrip', label = 'Spike Strip', weight = 500, type = 'item', image = 'spikestrip.png', unique = false, useable = true, shouldClose = true, description = 'Tire-puncturing strip for vehicle stops.'},shield = { name = 'shield', label = 'Ballistic Shield', weight = 500, type = 'item', image = 'shield.png', unique = false, useable = true, shouldClose = true, description = 'Protective shield for high-risk situations.'},Note:
qs-inventoryandps-inventoryuse the same format asqb-inventory. Adjust the file path to your inventory’s config location.
QBCore Community Service Metadata
Section titled “QBCore Community Service Metadata”If using QBCore with community service enabled, add this to your qb-core/player.lua:
PlayerData.metadata["communityservice"] = PlayerData.metadata["communityservice"] ~= nil and PlayerData.metadata["communityservice"] or 0Copy Item Images
Section titled “Copy Item Images”If your inventory shows missing item icons, copy the included image files from the script into your inventory image folder.
Included image source:
ars_police/_INSTALL/images/
Common destination paths:
ox_inventory:ox_inventory/web/images/qb-inventory:qb-inventory/html/images/qs-inventory:qs-inventory/html/images/
Copy these files:
evidence.pngevidence_tools.pnguvlight.png
Restart the inventory resource or your server if the icons do not appear immediately.
Verification
Section titled “Verification”- Start your server
- Connect as a player with a police job
- Press F6 (or your configured key) to open the police menu
- Test handcuffing, the armory, vehicle spawning, and evidence collection
- Check the server console for any errors
Updating
Section titled “Updating”- Backup your
config.luaandlocations/files - Replace the resource files with the new version
- Restore your configuration files
- Check the changelog for any breaking changes
- Restart the resource
Troubleshooting
Section titled “Troubleshooting”Police Menu Not Opening
Section titled “Police Menu Not Opening”- Ensure the player has a police job assigned in your framework
- Check
Config.PoliceJobNamesincludes your job name - Verify ox_lib is started and working
- Check console for errors
Evidence Not Working
Section titled “Evidence Not Working”- Verify all inventory items are added correctly
- Check
Config.Inventorymatches your inventory system - Ensure
Config.EnableEvidence = true
Database Errors
Section titled “Database Errors”- Verify oxmysql is running and the database connection is working
- Ensure the
ars_policetable was created - Check for column name mismatches
Target System Not Working
Section titled “Target System Not Working”- Install a supported target system (qb-target, qtarget, or ox_target)
- Set
Config.EnableTargeting = true - Ensure the target resource starts before ars_police
Resource Name Error
Section titled “Resource Name Error”- Do not rename the
ars_policefolder. The script validates its own resource name on startup.
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.