STG ScriptsDocumentation
Chess V2

Installation

Install STG Chess V2 on your FiveM server in five steps, with item examples for ESX, QBCore and ox_inventory.

Chess V2

STG Chess 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-chessv2 from Granted Assets.

Move the resource

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

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

Install the dependencies

Chess V2 needs ox_lib and stg_lib. Skip this step if your server already runs them.

Add the item

Players place a table with the stg_chess item. Add it to your inventory and copy stg_chess.png from the [SETUP]/[item-images]/ folder in the zip into your inventory's image folder.

INSERT INTO items (name, label)
VALUES
    ('stg_chess', 'Chess');

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

['stg_chess'] = { name = 'stg_chess', label = 'Chess', weight = 2000, type = 'item', image = 'stg_chess.png', unique = false, useable = true, shouldClose = true, description = 'Place it to play a game of chess' },

Add this to ox_inventory/data/items.lua. The client.event line is what opens the clock setup, so keep it.

['stg_chess'] = {
    label = 'Chess',
    weight = 2000,
    stack = false,
    close = true,
    description = 'Place it to play a game of chess',
    client = {
        event = 'stg-chessv2:client:useItem'
    }
},

The item name must match Config.Item, which defaults to stg_chess.

Start the script

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

ensure ox_lib
# your framework: es_extended, qb-core or qbx_core
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