diff --git a/[esx]/esx_notify/Notify.lua b/[esx]/esx_notify/Notify.lua index ca5e51cc..3778e9f3 100644 --- a/[esx]/esx_notify/Notify.lua +++ b/[esx]/esx_notify/Notify.lua @@ -7,8 +7,8 @@ local function Notify(notificatonType, length, message) if Debug then print("1 ".. tostring(notificatonType)) - print("1 "..tostring(length)) - print("1 "..message) + print("2 "..tostring(length)) + print("3 "..message) end if type(notificatonType) ~= "string" then @@ -20,9 +20,9 @@ local function Notify(notificatonType, length, message) end if Debug then - print("2 ".. tostring(notificatonType)) - print("2 "..tostring(length)) - print("2 "..message) + print("4 ".. tostring(notificatonType)) + print("5 "..tostring(length)) + print("6 "..message) end SendNuiMessage(json.encode({ @@ -37,10 +37,14 @@ exports('Notify', Notify) RegisterNetEvent("ESX:Notify", Notify) if Debug then - RegisterCommand("notify", function() + RegisterCommand("oldnotify", function() ESX.ShowNotification('No Waypoint Set.', true, false, 140) end) + RegisterCommand("notify", function() + ESX.ShowNotification("You Recived ~br~ 1x ball~s~!", "success", 3000) + end) + RegisterCommand("notify1", function() ESX.ShowNotification("Well ~g~Done~s~!", "success", 3000) end) diff --git a/[esx]/esx_notify/fxmanifest.lua b/[esx]/esx_notify/fxmanifest.lua index ae7e5847..b2caeaaf 100644 --- a/[esx]/esx_notify/fxmanifest.lua +++ b/[esx]/esx_notify/fxmanifest.lua @@ -3,7 +3,7 @@ lua54 'yes' game 'gta5' author 'ESX-Framework' -description 'ESX Notification system for esx_legacy' +description 'Official NUI Notification system for ESX' shared_script '@es_extended/imports.lua' diff --git a/[esx]/esx_notify/nui/js/script.js b/[esx]/esx_notify/nui/js/script.js index 947909fd..be430ef7 100644 --- a/[esx]/esx_notify/nui/js/script.js +++ b/[esx]/esx_notify/nui/js/script.js @@ -16,7 +16,7 @@ const types = { // the color codes example `i ~r~love~s~ donuts` const codes = { "~r~": "red", - "~b~": "blue", + "~b~": "#378cbf", "~g~": "green", "~y~": "yellow", "~p~": "purple", diff --git a/[esx]/esx_notify/readme.md b/[esx]/esx_notify/readme.md index 87236f6d..4897cc0b 100644 --- a/[esx]/esx_notify/readme.md +++ b/[esx]/esx_notify/readme.md @@ -1,4 +1,8 @@ -

ESX Notify

+

[ESX] Notify

Discord - Website - Documentation + +A beautiful and simple NUI notification system for ESX + +# Example Code

Change style and time

@@ -39,4 +43,10 @@ TriggerEvent("ESX:Notify", "info", 3000, "message here") ESX.ShowNotification("I i ~r~love~s~ donuts", "success", 3000) ``` -image +# Previews + +![Preview_1](https://cdn.discordapp.com/attachments/944789399852417096/997890963445927977/unknown.png) + +![Preview_2_zoom](https://cdn.discordapp.com/attachments/944789399852417096/997892214053163148/unknown.png) + +![Preview_2](https://cdn.discordapp.com/attachments/944789399852417096/997891726326898909/unknown.png)