Installation
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-uifolder into your server’sresourcesdirectory. - 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:
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))
endThis 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:
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 Key | Functions Affected |
|---|---|
notify | lib.notify |
textUI | lib.showTextUI, lib.hideTextUI, lib.isTextUIOpen |
progressBar | lib.progressBar, lib.progressCircle, lib.progressActive, lib.cancelProgress |
radial | lib.addRadialItem, lib.removeRadialItem, lib.clearRadialItems, lib.registerRadial, lib.hideRadial, lib.disableRadial, lib.getCurrentRadialId |
skillCheck | lib.skillCheck, lib.skillCheckActive, lib.cancelSkillCheck |
inputDialog | lib.inputDialog, lib.closeInputDialog |
contextMenu | lib.registerContext, lib.showContext, lib.hideContext, lib.getOpenContextMenu |
alertDialog | lib.alertDialog, lib.closeAlertDialog |
listMenu | lib.registerMenu, lib.showMenu, lib.hideMenu, lib.getOpenMenu |