STG ScriptsDocumentation
Game Consoles

Installation

Install STG Game Consoles on your FiveM server, add the 12 console items to your inventory and start it.

Game Consoles

STG Game Consoles

ESXQBCoreQBOX
View in store

Download the script

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

Move the resource

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

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

Install the dependency

Game Consoles needs stg_lib. Skip this step if your server already runs it.

Add the items

Every console color is its own item. Pick the tab for your inventory. QBOX servers, and any ESX or QBCore server running ox_inventory, use the ox_inventory tab.

Add these entries to ox_inventory/data/items.lua:

["stg_handheld_navy"] = {
    label = "Pocket Console (Navy)",
    weight = 300,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_handheld_orange"] = {
    label = "Pocket Console (Orange)",
    weight = 300,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_handheld_pink"] = {
    label = "Pocket Console (Pink)",
    weight = 300,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_handheld_mint"] = {
    label = "Pocket Console (Mint)",
    weight = 300,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_handheld_white"] = {
    label = "Pocket Console (White)",
    weight = 300,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_handheld_black"] = {
    label = "Pocket Console (Black)",
    weight = 300,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_pocketx_lilac"] = {
    label = "Pocket X (Lilac)",
    weight = 450,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_pocketx_orange"] = {
    label = "Pocket X (Orange)",
    weight = 450,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_pocketx_mint"] = {
    label = "Pocket X (Mint)",
    weight = 450,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_pocketx_sky"] = {
    label = "Pocket X (Sky)",
    weight = 450,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_pocketx_white"] = {
    label = "Pocket X (White)",
    weight = 450,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},
["stg_pocketx_black"] = {
    label = "Pocket X (Black)",
    weight = 450,
    stack = false,
    close = true,
    client = {
        event = 'stg-gameconsoles:client:useItem'
    }
},

Add these lines to QBShared.Items in qb-core/shared/items.lua:

stg_handheld_navy = { name = 'stg_handheld_navy', label = 'Pocket Console (Navy)', weight = 300, type = 'item', image = 'stg_handheld_navy.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_handheld_orange = { name = 'stg_handheld_orange', label = 'Pocket Console (Orange)', weight = 300, type = 'item', image = 'stg_handheld_orange.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_handheld_pink = { name = 'stg_handheld_pink', label = 'Pocket Console (Pink)', weight = 300, type = 'item', image = 'stg_handheld_pink.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_handheld_mint = { name = 'stg_handheld_mint', label = 'Pocket Console (Mint)', weight = 300, type = 'item', image = 'stg_handheld_mint.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_handheld_white = { name = 'stg_handheld_white', label = 'Pocket Console (White)', weight = 300, type = 'item', image = 'stg_handheld_white.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_handheld_black = { name = 'stg_handheld_black', label = 'Pocket Console (Black)', weight = 300, type = 'item', image = 'stg_handheld_black.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_pocketx_lilac = { name = 'stg_pocketx_lilac', label = 'Pocket X (Lilac)', weight = 450, type = 'item', image = 'stg_pocketx_lilac.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_pocketx_orange = { name = 'stg_pocketx_orange', label = 'Pocket X (Orange)', weight = 450, type = 'item', image = 'stg_pocketx_orange.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_pocketx_mint = { name = 'stg_pocketx_mint', label = 'Pocket X (Mint)', weight = 450, type = 'item', image = 'stg_pocketx_mint.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_pocketx_sky = { name = 'stg_pocketx_sky', label = 'Pocket X (Sky)', weight = 450, type = 'item', image = 'stg_pocketx_sky.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_pocketx_white = { name = 'stg_pocketx_white', label = 'Pocket X (White)', weight = 450, type = 'item', image = 'stg_pocketx_white.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },
stg_pocketx_black = { name = 'stg_pocketx_black', label = 'Pocket X (Black)', weight = 450, type = 'item', image = 'stg_pocketx_black.png', unique = true, useable = true, shouldClose = true, description = 'A handheld game console.' },

Run this query on your database:

INSERT INTO items (name, label)
VALUES
  ('stg_handheld_navy', 'Pocket Console (Navy)'),
  ('stg_handheld_orange', 'Pocket Console (Orange)'),
  ('stg_handheld_pink', 'Pocket Console (Pink)'),
  ('stg_handheld_mint', 'Pocket Console (Mint)'),
  ('stg_handheld_white', 'Pocket Console (White)'),
  ('stg_handheld_black', 'Pocket Console (Black)'),
  ('stg_pocketx_lilac', 'Pocket X (Lilac)'),
  ('stg_pocketx_orange', 'Pocket X (Orange)'),
  ('stg_pocketx_mint', 'Pocket X (Mint)'),
  ('stg_pocketx_sky', 'Pocket X (Sky)'),
  ('stg_pocketx_white', 'Pocket X (White)'),
  ('stg_pocketx_black', 'Pocket X (Black)');

Add the item images

Copy the 12 images from stg-gameconsoles/[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 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