Skip to content

Commit

Permalink
Remove or statements that don't do stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jan 28, 2024
1 parent 37486d9 commit be2f57d
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions server-data/resources/[esx]/esx_notify/Notify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit be2f57d

Please sign in to comment.