βFAQ & Troubleshooting
Q: I set Config.UseTxAdminAnnouncements = true, but I still see the default txAdmin notifications. Why?
A: You need to disable the default txAdmin announcements in your server.cfg by adding the following lines:
setr txAdmin-hideDefaultScheduledRestartWarning true
setr txAdmin-hideDefaultAnnouncement trueRisk Notify & Progressbar for ESX
Installation for ESX users
1. Help Notify Integration
Go to:
es_extended/client/functions.luaFind the function
ESX.ShowHelpNotificationReplace the entire function with:
function ESX.ShowHelpNotification(message, key) exports['risk-notify']:HelpNotify(key or "E", message) end
2. Notification Integration
Find the function
ESX.ShowNotificationReplace it with:
function ESX.ShowNotification(message, notifyType, length) exports['risk-notify']:Notify({ type = notifyType or 'info', -- success | error | info title = 'Notification', -- or your own title message = message, duration = length or 8000 -- milliseconds }) end
3. Progressbar Integration
Find the function
ESX.ProgressbarReplace it with:
function ESX.Progressbar(message, length, options) options = options or {} exports['risk-notify']:startProgress( length or 5000, message, { prop = options.prop, freeze = options.freeze or false, anim = options.anim, onFinish = options.onFinish, onCancel = options.onCancel, } ) endOptional: Replace
ESX.CancelProgressbarwith:function ESX.CancelProgressbar() if exports['risk-notify'].cancelProgress then exports['risk-notify']:cancelProgress() end end
Done! All ESX notifications and progress bars now use your Risk Notify system.
If you need more help CONTACT
Risk Notify & Progressbar for QBCore
β―HelpβNotify
Open qbβcore/client/functions.lua.
Add (or replace) the helper so every script can call it globally:
function QBCore.Functions.HelpNotify(message, key)
exports['risk-notify']:HelpNotify(key or "E", message)
end
Notification wrapper
Locate the original QBCore.Functions.Notify and replace the whole function with:
function QBCore.Functions.Notify(message, notifyType, length)
exports['risk-notify']:Notify({
type = notifyType or 'info',
title = 'Notification',
message = message,
duration = length or 8000
})
end
(The old signature is preserved, so every existing QBCore.Functions.Notify(...) call still works.) QBCore Dokumentation
#### 3.β―Progressbar wrapper
Replace the stock progressβbar helper with:
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, anim, prop, onFinish, onCancel)
exports['risk-notify']:startProgress(
duration or 5000,
label,
{
anim = anim,
prop = prop,
freeze = not canCancel,
onFinish = onFinish,
onCancel = onCancel
}
)
end
Optional cancellation helper (keeps API parity with ESX example):
function QBCore.Functions.CancelProgressbar()
if exports['risk-notify'].cancelProgress then
exports['risk-notify']:cancelProgress()
end
end
(The wrapper keeps every original parameter so scripts using the long QBCore progressβbar call continue to function.) GitHub
Risk Notify & Progressbar for QBox
Since QBox uses ox_lib by default, you need to patch ox_lib itself to integrate risk-notify.
1. ox_lib Notify Wrapper
Go to ox_lib/resource/interface/client/notify.lua and replace the lib.notify function:
OLD:
function lib.notify(data)
-- Original ox_lib code
endNEW:
function lib.notify(data)
exports['risk-notify']:Notify({
type = data.type or 'info',
title = data.title or 'Notification',
message = data.description or '',
duration = data.duration or 8000
})
end2. ox_lib Progressbar Wrapper
Go to ox_lib/resource/interface/client/progress.lua and replace the lib.progressBar function:
OLD:
function lib.progressBar(data)
-- Original ox_lib code
endNEW:
function lib.progressBar(data)
return exports['risk-notify']:startProgress(
data.duration or 5000,
data.label or 'Loading...',
{
anim = data.anim,
prop = data.prop,
freeze = not data.canCancel,
onFinish = function() return true end,
onCancel = function() return false end
}
)
end3. HelpNotify Export (if needed)
If ox_lib doesn't have lib.helpNotify, add this to ox_lib/resource/interface/client/notify.lua:
function lib.helpNotify(key, message)
exports['risk-notify']:HelpNotify(key or "E", message)
endLast updated