STG ScriptsDocumentation
Contract

Installation

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

Contract

STG Contract

ESXQBCoreQBOX
View in store

Download the script

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

Move the resource

Extract the zip and place the stg-contract folder inside the [STG] category folder in your resources directory. The [SETUP] folder next to it only holds the item image, so do not copy it into resources.

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

Install the dependencies

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

Add the item

Players open the contract with the contract item. Add it to your inventory and copy contract.png from [SETUP]/item-images/ into your inventory's image folder.

INSERT INTO items (name, label)
VALUES
    ('contract', 'Contract');

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

['contract'] = { name = 'contract', label = 'Contract', weight = 100, type = 'item', image = 'contract.png', unique = true, useable = true, shouldClose = true, description = 'A vehicle sale contract.' },

Add this to ox_inventory/data/items.lua:

['contract'] = {
    label = 'Contract',
    weight = 1000,
    stack = false,
    description = 'A vehicle sale contract.',
},

Using a different item name? Change Config.Item to match, see Configuration.

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.

The vehicle list is read from the framework's own table: owned_vehicles on ESX and player_vehicles on QBCore and QBOX. The sale also changes the owner in that table. If your garage script stores vehicles in a different table, those vehicles do not show up.

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