STG ScriptsDocumentation

stg_lib Overview

Framework-agnostic bridge powering every STG Scripts resource. Works with ESX, QBCore, and QBOX through a single unified API.

stg_lib is the framework bridge that every STG Scripts resource depends on. It exposes a single API that works identically across ESX, QBCore, and QBOX, so you never write framework-specific code in a script's logic.

Why use it

  • Single install, three frameworks: the same resource runs on any supported framework
  • Cached reads: player name, gender, DOB, and nationality are cached, so stg_getName() is free to call anywhere
  • Dot syntax only: all methods are called with :stg_method() or .stg_method() on the Player object (see notes on each page)

Install

  1. Download stg_lib from your order page
  2. Place under resources/[stg]/stg_lib
  3. Add to server.cfg before any other STG resource:
ensure ox_lib
ensure oxmysql
ensure stg_lib

API reference

Still having trouble?

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

Get help on Discord

On this page