STG ScriptsDocumentation
Gold Panning V2

Installation

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

Gold Panning V2

STG Gold Panning V2

ESXQBCoreQBOX
View in store

Download the script

Sign in to the Cfx.re portal with the account you used at checkout and download stg-goldpanningv2 from Granted Assets.

Move the resource

Extract the zip and place the stg-goldpanningv2 folder inside the [STG] category folder in your resources directory.

resources/
└── [STG]/
    ├── stg_lib/
    └── stg-goldpanningv2/

Install the dependencies

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

Add the items

The script uses five items: two tools and three finds.

NameLabelRole
stg_goldpanGold PanUsable, takes the pan out or puts it away
stg_goldtablePanning TableUsable, places a panning table
stg_goldnuggetGold NuggetFind
stg_goldnugget_bigBig Gold NuggetFind
stg_emeraldEmeraldFind

QBOX servers use the ox_inventory tab.

Run this in your database:

INSERT INTO items (name, label)
VALUES
    ('stg_goldpan', 'Gold Pan'),
    ('stg_goldtable', 'Panning Table'),
    ('stg_goldnugget', 'Gold Nugget'),
    ('stg_goldnugget_big', 'Big Gold Nugget'),
    ('stg_emerald', 'Emerald');

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

stg_goldpan        = { name = 'stg_goldpan', label = 'Gold Pan', weight = 1000, type = 'item', image = 'stg_goldpan.png', unique = false, useable = true, shouldClose = true, description = 'Basic tool for sifting dirt' },
stg_goldtable      = { name = 'stg_goldtable', label = 'Panning Table', weight = 5000, type = 'item', image = 'stg_goldtable.png', unique = false, useable = true, shouldClose = true, description = 'Place it to sift on' },
stg_goldnugget     = { name = 'stg_goldnugget', label = 'Gold Nugget', weight = 100, type = 'item', image = 'stg_goldnugget.png', unique = false, useable = false, shouldClose = true, description = 'Raw river gold' },
stg_goldnugget_big = { name = 'stg_goldnugget_big', label = 'Big Gold Nugget', weight = 250, type = 'item', image = 'stg_goldnugget_big.png', unique = false, useable = false, shouldClose = true, description = 'A rare large nugget' },
stg_emerald        = { name = 'stg_emerald', label = 'Emerald', weight = 50, type = 'item', image = 'stg_emerald.png', unique = false, useable = false, shouldClose = true, description = 'A rare green gem' },

Add these to ox_inventory/data/items.lua:

['stg_goldpan'] = {
    label = 'Gold Pan',
    weight = 1000,
    stack = false,
    close = true,
    client = {
        event = 'stg-goldpanningv2:client:usePan'
    }
},

['stg_goldtable'] = {
    label = 'Panning Table',
    weight = 5000,
    stack = false,
    close = true,
    client = {
        event = 'stg-goldpanningv2:client:useTable'
    }
},

['stg_goldnugget'] = {
    label = 'Gold Nugget',
    weight = 100,
    stack = true,
    close = true,
},

['stg_goldnugget_big'] = {
    label = 'Big Gold Nugget',
    weight = 250,
    stack = true,
    close = true,
},

['stg_emerald'] = {
    label = 'Emerald',
    weight = 50,
    stack = true,
    close = true,
},

Add the item images

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

Database

The script creates its stg_goldpanning table (levels, XP, ability points and abilities) by itself on the first start, because Config.AutoInstallSQL is true by default.

If your database user is not allowed to create tables, import stg-goldpanningv2/[SETUP]/[SQL]/stg_goldpanningv2.sql yourself and set Config.AutoInstallSQL = false in config/config.lua.

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_lib
ensure [STG]

Then restart the whole server.

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