Installation
This guide will walk you through installing prp-metaldetector on your FiveM server.
Installation steps
1
Download the resources
Download both
prp-metaldetector and prp-metaldetector-assets from the CFX portal and place them in your resources folder.2
Add to server.cfg
Add both resources to your
server.cfg after all dependencies, with the assets resource before the main script. ensure ox_lib
ensure prp-bridge
ensure prp-metaldetector-assets
ensure prp-metaldetector3
Add items
Add the required items to your inventory resource — see Items below.
4
Configure server config
Open
config/server.lua to configure the treasure loot table and Discord webhook.5
Configure client config
Open
config/client.lua to adjust zone definitions, treasure caps and minigame settings.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.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
["metaldetector"] = {
label = "Metal Detector",
weight = 1500
},
["treasure_chest"] = {
label = "Treasure Chest",
weight = 500
},
["treasure_key"] = {
label = "Treasure Key",
weight = 100,
},
["gold_coin"] = {
label = "Gold Coin",
weight = 50,
stack = 99,
},Add items listed below to your ox_inventory into data/weapons.lua.
lua
["weapon_shovel"] = {
label = "Shovel",
weight = 2000,
stack = false,
},TIP
The items gold, silver and plastic that appear in the treasure chest loot table are assumed to already exist in your inventory. Add them if they don't.