ShowHelpNotification
Here, you will learn how to integrate our showHelpNotification system into your scripts, as well as into ESX or QBCore.
Events and exports
Client
exports['PNotifv2']:ShowHelpNotification('Press ~INPUT_PICKUP~ to pick up', true, 'white')TriggerEvent('pnotifv2:showHelpNotification', 'Press ~INPUT_PICKUP~ to pick up', true, 'white')ESX
TriggerEvent('esx:showHelpNotification', 'Press ~INPUT_PICKUP~ to pick up', true, 'white')ESX.ShowHelpNotification('Press ~INPUT_PICKUP~ to pick up', true)QBCORE
QBCore.Functions.ShowHelpNotification('~g~Press~s~ ~INPUT_PICKUP~ to talk to the contact', true)Integrate ESX
You can always use esx.ShowHelpNotification.
If you make any changes in your es_extended, go to the file es_extended/client/functions.lua.
Replace
ESX.ShowHelpNotification = function(msg, thisFrame, beep, duration)
AddTextEntry('esxHelpNotification', msg)
if thisFrame then
DisplayHelpTextThisFrame('esxHelpNotification', false)
else
if beep == nil then beep = true end
BeginTextCommandDisplayHelp('esxHelpNotification')
EndTextCommandDisplayHelp(0, false, beep, duration or -1)
end
endThen, add this
Next, open the file es_extended/client/main.lua and add the following at the end of the file.
Integrate QBCore
You can always use QBCore.Functions.ShowHelpNotification.
If you need to make any changes, open the file qb-core/client/functions.lua and add the corresponding line at the very end of the file.
Last updated