🎲ESX
This guide works on es_extended version
1.10.9
. If it doesn't work on a higher version, report the issue on Discord.
ONEX NOTIFICATION
Follow these steps to replace the default ESX notifications with ONEX Notification.
Step 1: Modify the Client Notification
-
Navigate to the Core Folder:
- Go to your
es_extended
folder. - Open the file:
es_extended/client/functions.lua
- Go to your
-
Locate the Notification Function:
- Find the function
ESX.ShowNotification
.
- Find the function
-
Replace the Function:
This is original Function
es_extended/client/function.lua
function ESX.ShowNotification(message, notifyType, length)
return IsResourceFound('esx_notify') and exports['esx_notify']:Notify(notifyType, length, message)
end
Replace the current function with the code below:
es_extended/client/function.lua
function ESX.ShowNotification(msg, texttype, length)
if not texttype then
texttype = 'primary'
end
TriggerEvent('onx-interaction:client:notify', false, false, 1, msg, texttype == 'primary' and '#00FF85' or '#ff0039', length)
end
Step 2: Review and Test
- Once you have made the changes, restart your server.
- Test the notification system by triggering any in-game notification to ensure ONEX Notifications are now in place.