STG ScriptsDocumentation
Chess

Installation

Install STG Chess on your FiveM server in five steps, with item examples for ox_inventory, qb-inventory and ESX.

Chess

STG Chess

ESXQBCoreQBOX
View in store

Download the script

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

Move the resource

Extract the zip and place the stg-chess folder inside the [STG] category folder in your resources directory. Keep the folder name exactly stg-chess. The [SETUP] folder next to it holds the item image, it does not go into resources.

resources/
└── [STG]/
    └── stg-chess/

Install the dependencies

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

Add the item

Players place a table with the chess_table item. Add it to your inventory and copy [SETUP]/item-image/chess_table.png into your inventory's image folder. The item is not removed when it is used.

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

['chess_table'] = {
    label = 'Chess Table',
    weight = 2000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Place it to play a game of chess',
    client = {
        event = 'stg-chess:use'
    }
},

Copy chess_table.png to ox_inventory/web/images/.

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

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

Copy chess_table.png to qb-inventory/html/images/.

Run on your database:

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

The item name must match STG.item, which defaults to chess_table.

Start the script

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

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