STG ScriptsDocumentation
Card Game V2

Installation

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

Card Game V2

STG Card Game 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-cardgame from Granted Assets.

Move the resource

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

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

Install the dependencies

Card Game V2 needs ox_lib and oxmysql. Skip this step if your server already runs them.

Add the item

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

INSERT INTO items (name, label)
VALUES
    ('cardgame', 'Card Game');

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

['cardgame'] = { name = 'cardgame', label = 'Card Game', weight = 100, type = 'item', image = 'cardgame.png', unique = false, useable = true, shouldClose = true, description = 'Place a table and play cards with your friends' },

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

['cardgame'] = {
    label = 'Card Game',
    weight = 100,
    stack = false,
    close = true,
    description = 'Place a table and play cards with your friends',
    client = {
        event = 'stg-cardgame:start'
    }
},

The item name must match item in config.lua, which defaults to cardgame.

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