STG ScriptsDocumentation
Smart Watch

Configuration

Every option in STG Smart Watch config.lua, the framework and voice settings, and the export that opens the watch from other scripts.

All settings live in stg-smartwatch/config.lua. The file stays editable in the escrow version. Restart the resource after a change.

Framework and voice

STG = {}

STG.Framework = "esx" -- esx, qb
STG.Voice = "pma" -- saltychat or pma

Prop

Type

Framework loader

function getFramework()
    if STG.Framework == "esx" then
        return exports["es_extended"]:getSharedObject()
    else
        return exports['qb-core']:GetCoreObject()
    end
end

Loads the framework core object. Change the resource names here only if your framework runs under a different resource name.

Opening the watch from another script

The resource has a client export that opens the watch, the same way using the item does:

exports['stg-smartwatch']:use('black')

The argument is the watch color: black, white or red. Any other value opens the black watch. The ox_inventory items call this export and pass the client.color field of the item.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page