STG ScriptsDocumentation
Gold Panning

Installation

Install STG Gold Panning and its prop resource on your FiveM server, with item definitions for ESX, QBCore and ox_inventory.

Gold Panning

STG Gold Panning

ESXQBCoreQBOX
View in store

Download the script

Sign in to the Cfx.re portal with the account you used at checkout and download Gold Panning from Granted Assets. The zip holds two resources: stg-goldpanning and stg-goldpanning-prop.

Move the resources

Extract the zip and place both folders inside the [STG] category folder in your resources directory.

resources/
└── [STG]/
    ├── stg-goldpanning/
    └── stg-goldpanning-prop/

stg-goldpanning-prop streams the tray models. Without it, players cannot place the table or take out the tray.

Install the dependencies

Gold Panning needs ox_lib and oxmysql. Skip this step if your server already runs them.

Add the items

The script uses three items. The names come from Config.Items in config.lua.

NameLabelRole
purify_tablePurify TableUsable, places the panning table
gold_panGold PanUsable, takes out the empty tray
gold_nuggetGold NuggetReward, sold at the buyer

QBOX servers use the ox_inventory tab.

Run this in your database:

INSERT INTO items (name, label, weight, rare, can_remove)
VALUES
    ('purify_table', 'Purify Table', 1, 0, 1),
    ('gold_pan', 'Gold Pan', 1, 0, 1),
    ('gold_nugget', 'Gold Nugget', 0, 0, 1);

Add these to qb-core/shared/items.lua:

purify_table = { name = 'purify_table', label = 'Purify Table', weight = 0, type = 'item', image = 'purify_table.png', unique = false, useable = true, shouldClose = true, description = '' },
gold_pan     = { name = 'gold_pan', label = 'Gold Pan', weight = 0, type = 'item', image = 'gold_pan.png', unique = false, useable = true, shouldClose = true, description = '' },
gold_nugget  = { name = 'gold_nugget', label = 'Gold Nugget', weight = 0, type = 'item', image = 'gold_nugget.png', unique = false, useable = false, shouldClose = false, description = '' },

Add these to ox_inventory/data/items.lua:

['purify_table'] = {
    label = 'Purify Table',
    weight = 0,
    close = true,
    client = {
        export = 'stg-goldpanning.useTable'
    }
},

['gold_pan'] = {
    label = 'Gold Pan',
    weight = 0,
    close = true,
    client = {
        export = 'stg-goldpanning.usePan'
    }
},

['gold_nugget'] = {
    label = 'Gold Nugget',
    weight = 0,
},

useTable and usePan are client exports of stg-goldpanning. You can also call them from your own scripts, for example exports['stg-goldpanning']:usePan().

Add the item images

Copy the images from stg-goldpanning/[SETUP]/item-images/ into your inventory's image folder, for example ox_inventory/web/images/ or qb-inventory/html/images/.

Start the script

Make sure [STG] starts after your framework, inventory, oxmysql and ox_lib in server.cfg:

ensure oxmysql
ensure ox_lib
# your framework: es_extended, qb-core or qbx_core
# your inventory, and ox_target or qb-target if you use one
ensure [STG]

Then restart the whole server.

Keep the folder name stg-goldpanning. If the resource is renamed, it keeps printing a rename warning in the console.

Nothing happens or the console shows an error? See Common Errors.

Next steps

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page