Skip to content

Installation ​

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

Installation steps

1
Download the resources
Download prp-mining, prp-mining-assets from the CFX portal and place them in your resources folder.
2
Add to server.cfg
Add all resources to your server.cfg after all dependencies.
ensure oxmysql
ensure ox_lib
ensure prp-bridge
ensure prp-mining-assets
ensure prp-mining
3
Add items
Add the required items to your inventory resource — see Items below.
4
Configure
Open config/sh_config.lua to adjust zones, ore types, drill settings and reputation perks.
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.

Items ​

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

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

lua
-- Ore items (raw drops)
["iron_ore"] = { label = "Iron Ore", weight = 500, stack = 50 },
["copper_ore"] = { label = "Copper Ore", weight = 500, stack = 50 },
["zinc_ore"] = { label = "Zinc Ore", weight = 500, stack = 50 },
["aluminium_ore"] = { label = "Aluminium Ore", weight = 500, stack = 50 },
["lithium_ore"] = { label = "Lithium Ore", weight = 500, stack = 50 },
["nickel_ore"] = { label = "Nickel Ore", weight = 500, stack = 50 },
["magnesium_ore"] = { label = "Magnesium Ore", weight = 500, stack = 50 },
["gold_ore"] = { label = "Gold Ore", weight = 500, stack = 50 },
["diamond_ore"] = { label = "Diamond Ore", weight = 500, stack = 50 },
["limestone_ore"] = { label = "Limestone Ore", weight = 500, stack = 50 },
["basic_looking_ore"] = { label = "Stone Ore", weight = 500, stack = 50 },
["gem_ore"] = { label = "Gem Ore", weight = 500, stack = 50 },
-- Refined minerals (after cleaning)
["iron"] = { label = "Iron", weight = 500, stack = 50 },
["copper"] = { label = "Copper", weight = 500, stack = 50 },
["zinc"] = { label = "Zinc", weight = 500, stack = 50 },
["aluminium"] = { label = "Aluminium", weight = 500, stack = 50 },
["lithium"] = { label = "Lithium", weight = 500, stack = 50 },
["nickel"] = { label = "Nickel", weight = 500, stack = 50 },
["magnesium"] = { label = "Magnesium", weight = 500, stack = 50 },
["gold"] = { label = "Gold", weight = 500, stack = 50 },
["diamond"] = { label = "Diamond", weight = 500, stack = 50 },
["limestone"] = { label = "Limestone", weight = 500, stack = 50 },
["basic_looking"] = { label = "Stone", weight = 500, stack = 50 },
["gem"] = { label = "Gem", weight = 500, stack = 50 },
-- Gems (found in tunnels, rank 5+)
["sapphire_gem"] = { label = "Sapphire", weight = 100, stack = 50 },
["ruby_gem"] = { label = "Ruby", weight = 100, stack = 50 },
["emerald_gem"] = { label = "Emerald", weight = 100, stack = 50 },
["topaz_gem"] = { label = "Topaz", weight = 100, stack = 50 },

Weapons ​

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

Add items listed below to your ox_inventory into data/weapons.lua.

lua
['WEAPON_PICKAXE'] = {
    label = 'Pickaxe',
    weight = 1134,
    durability = 0.0,
},

['WEAPON_DRILL'] = {
    label = 'Drill',
    weight = 1134,
    durability = 0.0,
},
['WEAPON_DRILL_COBALT'] = {
    label = 'Cobalt Drill Bit',
    weight = 500,
    durability = 0.0,
},
['WEAPON_DRILL_HSS'] = {
    label = 'HSS Drill Bit',
    weight = 500,
    durability = 0.0,
},
['WEAPON_DRILL_DIAMOND'] = {
    label = 'Diamond Drill Bit',
    weight = 500,
    durability = 0.0,
},

Database ​

The reputation table is created automatically on first server start:

sql
CREATE TABLE IF NOT EXISTS `prp_mining_reputation` (
    `stateId` VARCHAR(50) NOT NULL,
    `reputation` INT NOT NULL DEFAULT 0,
    PRIMARY KEY (`stateId`)
);