From be2f57d738d41232e7710c6ce2de8a74298198fd Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Sun, 28 Jan 2024 12:14:24 +0100 Subject: [PATCH] Remove or statements that don't do stuff --- .../resources/[esx]/esx_notify/Notify.lua | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/server-data/resources/[esx]/esx_notify/Notify.lua b/server-data/resources/[esx]/esx_notify/Notify.lua index 656b378c8..9b586bb76 100644 --- a/server-data/resources/[esx]/esx_notify/Notify.lua +++ b/server-data/resources/[esx]/esx_notify/Notify.lua @@ -5,9 +5,9 @@ local Debug = ESX.GetConfig().EnableDebug ---@param message any the message :D local function Notify(notificatonType, length, message) if Debug then - print(('1 %s'):format(tostring(notificatonType))) - print(('2 %s'):format(tostring(length))) - print(('3 %s'):format(message)) + print(("1 %s"):format(tostring(notificatonType))) + print(("2 %s"):format(tostring(length))) + print(("3 %s"):format(message)) end if type(notificatonType) ~= "string" then @@ -19,25 +19,24 @@ local function Notify(notificatonType, length, message) end if Debug then - print(('4 %s'):format(tostring(notificatonType))) - print(('5 %s'):format(tostring(length))) - print(('6 %s'):format(message)) + print(("4 %s"):format(tostring(notificatonType))) + print(("5 %s"):format(tostring(length))) + print(("6 %s"):format(message)) end SendNuiMessage(json.encode({ - type = notificatonType or "info", - length = length or 3000, - message = message or "ESX-Notify" + type = notificatonType, + length = length, + message = message or "ESX-Notify", })) end - -exports('Notify', Notify) +exports("Notify", Notify) RegisterNetEvent("ESX:Notify", Notify) if Debug then RegisterCommand("oldnotify", function() - ESX.ShowNotification('No Waypoint Set.', true, false, 140) + ESX.ShowNotification("No Waypoint Set.", true, false, 140) end) RegisterCommand("notify", function()