Skip to Content

Installation

Basic installation instructions for trinity-ui

Asset Download

To find the asset, you must have made the purchase using your own keymaster account. Otherwise, you can use the transfer system to move the asset to a different keymaster account.

Once the purchase is made on our official website, you will receive your asset directly in your cfx portal . From your panel you can download the asset and install it following the documentation below.

Installation

  • Drag-and-drop the trinity-ui folder into your server’s resources directory.
  • Add to your server.cfg:
    ensure trinity-ui
  • Edit configuration as desired — see the Configuration page.
  • Restart your server.

Make sure trinity-ui is started before any resources that depend on it.

ox_lib Migration

To integrate Trinity UI with ox_lib, add the following code at the bottom of your ox_lib’s init.lua file:

ox_lib/init.lua
local TRINITY_RESOURCE = "trinity-ui" if GetResourceState(TRINITY_RESOURCE) == "missing" then return end local success, err = pcall(function() local code = LoadResourceFile(TRINITY_RESOURCE, "init.lua") if code then load(code)() end end) if not success then error(("Failed to load trinity-ui. Error:"):format(err)) end

This snippet must be placed at the bottom of the file, after all existing ox_lib code. It loads Trinity UI’s override layer which replaces ox_lib’s UI functions (lib.notify, lib.showContext, lib.progressBar, etc.) with Trinity UI’s implementations.

Once added, all existing lib.notify(), lib.showContext(), lib.progressBar(), and other ox_lib UI calls across your resources will automatically use Trinity UI’s interface — no changes needed in your other scripts.

You can selectively disable components from being overridden by setting the trinity:disabledComponents convar in your server.cfg. Set a component to true to keep ox_lib’s native version:

server.cfg
setr trinity:disabledComponents { "textUI": false, "notify": false, "progressBar": false, "radial": false, "skillCheck": false, "inputDialog": false, "contextMenu": false, "alertDialog": false, "listMenu": false }

Available component keys:

Component KeyFunctions Affected
notifylib.notify
textUIlib.showTextUI, lib.hideTextUI, lib.isTextUIOpen
progressBarlib.progressBar, lib.progressCircle, lib.progressActive, lib.cancelProgress
radiallib.addRadialItem, lib.removeRadialItem, lib.clearRadialItems, lib.registerRadial, lib.hideRadial, lib.disableRadial, lib.getCurrentRadialId
skillChecklib.skillCheck, lib.skillCheckActive, lib.cancelSkillCheck
inputDialoglib.inputDialog, lib.closeInputDialog
contextMenulib.registerContext, lib.showContext, lib.hideContext, lib.getOpenContextMenu
alertDialoglib.alertDialog, lib.closeAlertDialog
listMenulib.registerMenu, lib.showMenu, lib.hideMenu, lib.getOpenMenu
Last updated on