STG ScriptsDocumentation
Billiards

Configuration

Every option in STG Billiards shared/config.lua, from the target system and admin access to notifications and HUD hiding.

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

Language

Config.Language = 'en'

Available: en, de, fr, es, pt, it, nl, pl, sv, no, fi, cs, ar, he, jp, ko, zh. To change a text, edit the matching file in stg-billiards/locales/.

Target system

Config.TargetSystem = 'auto'

Prop

Type

The target shows Play Pool on a free table and Take Your Shot when it is your turn and you walked away from the table. Admins also see Remove Table on tables placed with the admin panel.

Admin tables

Config.AdminCommand = 'pooladmin'
Config.AdminGroups = { 'admin', 'god', 'superadmin' }

Prop

Type

The table manager lists every placed table with its distance, a Waypoint and a Remove button. Add Table gives you a ghost table to place:

KeyAction
MouseMove the table where you look
Arrow left / rightRotate
Arrow up / downRaise or lower
EnterPlace the table
BackspaceCancel

Placed tables are saved in the stg_billiards_tables database table and show up for every player after a restart.

Notifications and help text

Config.Functions = {
    Notify = function(type, message)
        SendNUIMessage({ action = 'notify', type = type, message = message })
    end,
    ShowHelpNotify = function(message)
        SendNUIMessage({ action = 'helpNotify', message = message })
    end,
    HideHelpNotify = function()
        SendNUIMessage({ action = 'hideHelpNotify' })
    end,
    -- HideHud / ShowHud
}

Notifications and the key hints use the script's own UI by default. Replace the body of Notify with your own notify export to use your server's style. type is 'success', 'error' or 'inform'.

HUD

HideHud = function() ... end,
ShowHud = function() ... end,

While a player is in a game, stg-hud and jg-hud are hidden automatically and come back when they leave the table. For any other HUD, add its hide and show export to these two functions.

Still having trouble?

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

Get help on Discord

On this page