Skip to content

Installation

This guide will walk you through installing prp-drug-drops on your FiveM server.

Installation steps

1
Download the resource
Download prp-drug-drops from the CFX portal and place it in your resources folder.
2
Add to server.cfg
Add prp-drug-drops to your server.cfg after all dependencies.
ensure oxmysql
ensure ox_lib
ensure prp-bridge
ensure prp-drug-drops
3
Import SQL
Import the SQL file to create the leaderboard table.
ensure oxmysql
ensure ox_lib
ensure prp-bridge
ensure prp-drug-drops
or use installation/sql/init.sql.
4
Add item
Add the required item to your inventory resource — see Items below.
5
Configure config.lua
Open config.lua: set Config.Debug to false, configure Mission group and policeRequired, StartingNpc locations, Config.Runs (routes, spawns, drop points, rewards), and Requirements.itemPoints.
6
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.
sql
CREATE TABLE IF NOT EXISTS `drug_drop_times` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `zone_id` VARCHAR(50) NOT NULL,
    `route_index` INT NOT NULL,
    `completion_time` INT NOT NULL,
    `state_ids` TEXT NOT NULL,
    `completed_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX `idx_zone_route` (`zone_id`, `route_index`),
    INDEX `idx_completion_time` (`completion_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

Items

Add the delivery box item to your inventory resource. The drug items used as input (pure_meth_brick_*, cocaine_brick, mdma_brick, etc.) come from other crime scripts and do not need to be added here.

Add the item below to your ox_inventory into data/items.lua. A ready-made entry is also included in installation/items/ox_inventory.lua.

lua
["drug_drops_box"] = {
    label = "Suspicious Package",
    weight = 5000,
    stack = false,
    buttons = {
        {
            label = "Unbox",
            action = function(slot)
                TriggerServerEvent("prp-drug-drops:server:openDrugBox", slot)
            end,
        }
    }
},

TIP

The drug_drops_box item uses item metadata to store which drugs it contains. Make sure your inventory resource supports item metadata.

WARNING

The drug items required to start the run (pure_meth_brick_*, cocaine_brick, cocaine_mission_brick, mdma_brick, water) must already exist in your inventory. These are provided by other crime scripts. Make sure those resources are running before prp-drug-drops.