From 260e72b9c9dc00f333b67ab54a98c5eb9b54878b Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Sat, 18 Oct 2025 02:08:05 -0600 Subject: [PATCH] fix lation notify, add support for v42 notify --- Config.lua | 2 +- bridge/notify/client/v42.lua | 13 +++++++++++++ bridge/notify/server/lation.lua | 2 +- bridge/notify/server/v42.lua | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 bridge/notify/client/v42.lua create mode 100644 bridge/notify/server/v42.lua diff --git a/Config.lua b/Config.lua index a24b523..3461249 100644 --- a/Config.lua +++ b/Config.lua @@ -4,7 +4,7 @@ ps = {} Config.Inventory = "auto" -- auto, ox_inventory, qb-inventory, ps-inventory, lj-inventory, tgiann-inventory, jpr-inventory Config.Target = "auto" -- auto, ox_target, qb-target, interact Config.EmoteMenu = "rpemotes" -- rpemotes, dpemotes, scully, anything else for custom -Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts, okok, lation +Config.Notify = "ox" -- qb, ox, ps, esx, mad_thoughts, okok, lation, v42 Config.Menus = "ox" -- qb, ox, ps, lation Config.DrawText = "ox" -- qb, ox, ps, lation, okok Config.Banking = "qb" -- qb, okok, Renewed, none diff --git a/bridge/notify/client/v42.lua b/bridge/notify/client/v42.lua new file mode 100644 index 0000000..5c4fa60 --- /dev/null +++ b/bridge/notify/client/v42.lua @@ -0,0 +1,13 @@ +ps.success('Notification Module Loaded: V42 Notify') +function ps.notify(text, type, time) + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + exports['v42-notify']:notify(text, type, time) +end + +RegisterNetEvent('ps_lib:notify:v42', function(data) + ps.notify(data.message, data.type, data.duration) +end) + +exports('notify', ps.notify) \ No newline at end of file diff --git a/bridge/notify/server/lation.lua b/bridge/notify/server/lation.lua index c6af6d5..ed748c5 100644 --- a/bridge/notify/server/lation.lua +++ b/bridge/notify/server/lation.lua @@ -4,7 +4,7 @@ function ps.notify(source, text, type, time) if not type then type = 'info' end if not time then time = 5000 end TriggerClientEvent('ps_lib:notify:lation', source, { - description = text, + message = text, type = type, duration = time, }) diff --git a/bridge/notify/server/v42.lua b/bridge/notify/server/v42.lua new file mode 100644 index 0000000..01f2393 --- /dev/null +++ b/bridge/notify/server/v42.lua @@ -0,0 +1,14 @@ +function ps.notify(source, text, type, time) + if not source then return end + if not text then return end + if not type then type = 'info' end + if not time then time = 5000 end + TriggerClientEvent('ps_lib:notify:v42', source, { + message = text, + type = type, + duration = time, + }) +end + +exports('notify', ps.notify) +ps.success('Notification Module Loaded: V42 Notify') \ No newline at end of file