Skip to content

Installation ​

This guide will walk you through installing prp-gun-smuggling on your FiveM server.

Installation steps

1
Download the resources
Download both prp-gun-smuggling and prp-gun-smuggling-assets from the CFX portal and place them in your resources folder.
2
Add to server.cfg
Add the resource to your server.cfg.
ensure oxmysql
ensure ox_lib
ensure prp-bridge
ensure prp-gun-smuggling-assets
ensure prp-gun-smuggling
3
Add items
Add all required items to your inventory resource — see Items below.
4
Configure
Open config.lua to configure mission settings, locations, timers, police alert options, and truck transport rewards. Set Config.Debug = false on a live server.
5
Optional: inventory icons
Custom inventory icons are included in the installation/inventory icons folder. Copy them to your inventory resource's image directory if you'd like to use them.

WARNING

With Config.Debug = true the group requirement and minimum-member checks are bypassed. Always disable debug mode on a live server.

Database ​

The resource automatically creates two tables on startup via oxmysql:

  • gun_smuggling_cnc - tracks active CNC machine operations
  • gun_smuggling_airfield - tracks active tracker-removal operations at airfields

No manual SQL import is required.

Otherwise, if you lack database permissions, you can run the queries manually:

sql
CREATE TABLE IF NOT EXISTS `gun_smuggling_cnc` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `mission_id` INT(1) NULL,
    `started_by` VARCHAR(50) NULL,
    `picked_up` TINYINT(1) DEFAULT 0 NULL,
    `started_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `picked_up_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    INDEX `gun_smuggling_cnc_mission_id_index` (`mission_id`),
    INDEX `gun_smuggling_cnc_started_by_index` (`started_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `gun_smuggling_airfield` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `started_by` VARCHAR(50) NOT NULL,
    `mission_id` INT(1) NOT NULL,
    `picked_up` TINYINT(1) DEFAULT 0 NOT NULL,
    `started_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `picked_up_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    INDEX `gun_smuggling_airfield_mission_id_index` (`mission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

Items ​

Add all required items to your inventory resource using the format appropriate for your setup.

Add the items below to your ox_inventory into data/items.lua.

lua
-- Gun smuggling contracts
["gun_smuggling_contract_smg"] = { label = "SMG Contract", weight = 10, stack = false },
["gun_smuggling_contract_smg_large"] = { label = "Large SMG Contract", weight = 10, stack = false },
["gun_smuggling_contract_rifle"] = { label = "Rifle Contract", weight = 10, stack = false },
["gun_smuggling_contract_chaos"] = { label = "Rifle+ Contract", weight = 10, stack = false },

-- Mission item
["gun_smuggling_crate"] = { label = "Gun Crate", weight = 5000, stack = false },

-- Gun parts (transported goods)
["gun_parts"] = { label = "Gun Parts", weight = 200, stack = true },
["military_gun_parts"] = { label = "Military Gun Parts", weight = 200, stack = true },

-- SMG components & blueprints
["smg_slide"] = { label = "SMG Slide", weight = 100, stack = true },
["smg_lower"] = { label = "SMG Lower", weight = 100, stack = true },
["smg_upper"] = { label = "SMG Upper", weight = 100, stack = true },
["smg_barrel"] = { label = "SMG Barrel", weight = 100, stack = true },
["smg_grip"] = { label = "SMG Grip", weight = 100, stack = true },
["smg_trigger"] = { label = "SMG Trigger", weight = 100, stack = true },
["ammo_smg"] = { label = "SMG Ammo", weight = 50, stack = true },
["blueprint_smg_parts"] = { label = "Blueprint: SMG Parts", weight = 10, stack = true },
["blueprint_smg_minismg"] = { label = "Blueprint: Mini SMG", weight = 10, stack = false },
["blueprint_smg_microsmg"] = { label = "Blueprint: Micro SMG", weight = 10, stack = false },
["blueprint_smg_uzi"] = { label = "Blueprint: Uzi", weight = 10, stack = false },
["blueprint_smg_smgpistol"] = { label = "Blueprint: SMG Pistol", weight = 10, stack = false },
["blueprint_smg_machinepistol"] = { label = "Blueprint: Machine Pistol", weight = 10, stack = false },
["blueprint_for_smg_basic_parts"] = { label = "Blueprint: SMG Basic Parts", weight = 10, stack = true },
["blueprint_for_smg_semi_advanced_parts"] = { label = "Blueprint: SMG Semi-Advanced Parts", weight = 10, stack = true },
["blueprint_for_smg_advanced_parts"] = { label = "Blueprint: SMG Advanced Parts", weight = 10, stack = true },

-- Medium SMG components & blueprints
["smg_medium_slide"] = { label = "Medium SMG Slide", weight = 100, stack = true },
["smg_medium_lower"] = { label = "Medium SMG Lower", weight = 100, stack = true },
["smg_medium_upper"] = { label = "Medium SMG Upper", weight = 100, stack = true },
["smg_medium_barrel"] = { label = "Medium SMG Barrel", weight = 100, stack = true },
["smg_medium_grip"] = { label = "Medium SMG Grip", weight = 100, stack = true },
["smg_medium_trigger"] = { label = "Medium SMG Trigger", weight = 100, stack = true },
["blueprint_smg_medium_parts"] = { label = "Blueprint: Medium SMG Parts", weight = 10, stack = true },
["blueprint_smg_assaultsmg"] = { label = "Blueprint: Assault SMG", weight = 10, stack = false },
["blueprint_smg_gusenberg"] = { label = "Blueprint: Gusenberg", weight = 10, stack = false },
["blueprint_smg_smg_mk2"] = { label = "Blueprint: SMG Mk II", weight = 10, stack = false },

-- Rifle components & blueprints
["rifle_slide"] = { label = "Rifle Slide", weight = 100, stack = true },
["rifle_lower"] = { label = "Rifle Lower", weight = 100, stack = true },
["rifle_upper"] = { label = "Rifle Upper", weight = 100, stack = true },
["rifle_barrel"] = { label = "Rifle Barrel", weight = 100, stack = true },
["rifle_grip"] = { label = "Rifle Grip", weight = 100, stack = true },
["rifle_trigger"] = { label = "Rifle Trigger", weight = 100, stack = true },
["ammo_rifle"] = { label = "Rifle Ammo", weight = 50, stack = true },
["blueprint_rifle_parts"] = { label = "Blueprint: Rifle Parts", weight = 10, stack = true },
["blueprint_rifle_compactrifle"] = { label = "Blueprint: Compact Rifle", weight = 10, stack = false },
["blueprint_rifle_assaultrifle"] = { label = "Blueprint: Assault Rifle", weight = 10, stack = false },
["blueprint_rifle_bullpuprifle"] = { label = "Blueprint: Bullpup Rifle", weight = 10, stack = false },
["blueprint_rifle_tacticalrifle"] = { label = "Blueprint: Tactical Rifle", weight = 10, stack = false },
["blueprint_for_rifle_basic_parts"] = { label = "Blueprint: Rifle Basic Parts", weight = 10, stack = true },
["blueprint_for_rifle_semi_advanced_parts"] = { label = "Blueprint: Rifle Semi-Advanced Parts", weight = 10, stack = true },
["blueprint_for_rifle_advanced_parts"] = { label = "Blueprint: Rifle Advanced Parts", weight = 10, stack = true },