STG ScriptsDocumentation
Smart Watch

Installation

Install STG Smart Watch on your FiveM server, with the database tables, watch items for ox_inventory, qb-inventory and ESX, and the voice setting.

Smart Watch

STG Smart Watch

ESXQBCoreQBOX
View in store

Download the script

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

Move the resource

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

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

Install the dependencies

Smart Watch needs oxmysql and a voice resource, either pma-voice or SaltyChat. Skip this step if your server already runs them.

Import the database

Run the SQL file for your framework from stg-smartwatch/[SETUP]/[SQL]/ on your database:

  • ESX: esx.sql
  • QBCore and QBOX: qb.sql

Both create the stg_apple table (watch number, settings, contacts and messages) and the stg_applelastcall table (call log).

Add the items

The script uses three items, one per watch color: watch_black, watch_white and watch_red.

Add the items to ox_inventory/data/items.lua. The client.color field picks the watch color:

['watch_black'] = {
    label = 'Smart Watch',
    weight = 200,
    stack = false,
    close = true,
    consume = 0,
    client = {
        export = 'stg-smartwatch.use',
        color = 'black'
    }
},

['watch_white'] = {
    label = 'Smart Watch',
    weight = 200,
    stack = false,
    close = true,
    consume = 0,
    client = {
        export = 'stg-smartwatch.use',
        color = 'white'
    }
},

['watch_red'] = {
    label = 'Smart Watch',
    weight = 200,
    stack = false,
    close = true,
    consume = 0,
    client = {
        export = 'stg-smartwatch.use',
        color = 'red'
    }
},

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

watch_black = { name = 'watch_black', label = 'Smart Watch', weight = 2000, type = 'item', image = 'watch_black.png', unique = true, useable = true, shouldClose = true, description = 'A sleek black smart watch' },
watch_white = { name = 'watch_white', label = 'Smart Watch', weight = 2000, type = 'item', image = 'watch_white.png', unique = true, useable = true, shouldClose = true, description = 'A sleek white smart watch' },
watch_red = { name = 'watch_red', label = 'Smart Watch', weight = 2000, type = 'item', image = 'watch_red.png', unique = true, useable = true, shouldClose = true, description = 'A sleek red smart watch' },

esx.sql adds the three items to the items table. The script registers them as usable items, so nothing else is needed.

Add the item images

Copy the three images from stg-smartwatch/[SETUP]/images-for-inventory/ into your inventory's image folder, for example ox_inventory/web/images/ or qb-inventory/html/images/.

Set the framework and voice

Open stg-smartwatch/config.lua and set STG.Framework and STG.Voice to match your server. See Configuration.

Start the script

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

ensure oxmysql
# your framework: es_extended, qb-core or qbx_core
# your voice resource: pma-voice or saltychat
ensure [STG]

Then restart the whole server.

The stream/ folder ships mp_m_freemode_01_p_mp_m_bikerdlc_01^p_lwrist_006.ydd, which replaces a male freemode wrist watch with the smart watch model. If a clothing resource on your server streams a file with the same name, the two conflict. Keep only one of them.

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