Installation
Download the latest version of t3_lib from GitHub
Drag t3_lib to your server's resources folder and add
ensure t3_lib
to your server.cfg (make sure this is before any other t3 scripts)Config In the config.lua you will find some options you need to set up. The commented sections at the end of each line will tell you the currently supported options for each setting.
Config.Framework = 'ESX' --'ESX', 'QB' Config.Inventory = 'ox' -- 'ox', 'esx', 'qb', 'qs', 'mf' Config.Target = 'ox_target' -- 'ox_target', 'qb-target'
Notifications In the client/main.lua file you will find the notify function. This will need to be edited to use whatever notification script you have on your server. Some common examples have been provided.
--Notify Event (You can add your own notification event here or use one of the provided examples) RegisterNetEvent("t3_lib:notify", function(data) local n = { msg = data.msg, title = data.title or "Notification", duration = data.duration or 5000, type = data.type or "info", } ESX.ShowNotification(n.msg, n.type, n.duration) --QBCore.Functions.Notify(n.msg, (n.type == "info" and "primary" or n.type), n.duration) --exports['okokNotify']:Alert(n.title, string.gsub(n.msg, '(~[rbgypcmuonshw]~)', ''), n.duration, n.type) --exports['mythic_notify']:DoCustomHudText(n.type, string.gsub(n.msg, '(~[rbgypcmuonshw]~)', ''), n.duration) end)
Last updated