STG ScriptsDocumentation
Puzzle Cube

Installation

Install STG Puzzle Cube on your FiveM server, add the stg_puzzlecube item to your inventory and start it.

Puzzle Cube

STG Puzzle Cube

ESXQBCoreQBOX
View in store

Download the script

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

Move the resource

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

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

Install the dependency

Puzzle Cube needs stg_lib. Skip this step if your server already runs it.

Add the item

Pick the tab for your inventory. QBOX servers, and any ESX or QBCore server running ox_inventory, use the ox_inventory tab.

Add this entry to ox_inventory/data/items.lua:

["stg_puzzlecube"] = {
    label = "Puzzle Cube",
    weight = 100,
    stack = false,
    close = true,
    client = {
        event = 'stg-puzzlecube:client:useItem'
    }
},

Add this line to QBShared.Items in qb-core/shared/items.lua:

stg_puzzlecube = { name = 'stg_puzzlecube', label = 'Puzzle Cube', weight = 100, type = 'item', image = 'stg_puzzlecube.png', unique = true, useable = true, shouldClose = true, description = 'A 3x3 puzzle cube.' },

Run this query on your database:

INSERT INTO items (name, label)
VALUES ('stg_puzzlecube', 'Puzzle Cube');

Add the item image

Copy stg_puzzlecube.png from stg-puzzlecube/[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 and your inventory in server.cfg:

# your framework: es_extended, qb-core or qbx_core
# your inventory, for example ox_inventory
ensure stg_lib
ensure [STG]

Then restart the whole server.

Nothing happens when you use the item? 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