From 00f69aa315ba87a09ff25599b29080caa678371f Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:34:21 -0500 Subject: [PATCH] fix deprecated event method --- modules/clothing/qb-clothing/server.lua | 2 +- modules/notify/client.lua | 8 ++++++++ modules/notify/server.lua | 8 ++++++++ modules/utility/server/supplement_events.lua | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/clothing/qb-clothing/server.lua b/modules/clothing/qb-clothing/server.lua index d7a283a..5083d20 100644 --- a/modules/clothing/qb-clothing/server.lua +++ b/modules/clothing/qb-clothing/server.lua @@ -1,6 +1,6 @@ if GetResourceState('qb-clothing') ~= 'started' then return end -RegisterServerEvent('qb-clothing:saveSkin', function(model, skin) +RegisterNetEvent('qb-clothing:saveSkin', function(model, skin) local src = source if model ~= nil and skin ~= nil then TriggerClientEvent('community_bridge:client:updateStoredClothing', src, skin) diff --git a/modules/notify/client.lua b/modules/notify/client.lua index 1995499..67a810d 100644 --- a/modules/notify/client.lua +++ b/modules/notify/client.lua @@ -67,4 +67,12 @@ end RegisterNetEvent('community_bridge:Client:Notify', function(message, _type, time) Notify.SendNotify(message, _type, time) +end) + +RegisterNetEvent('community_bridge:Client:ShowHelpText', function(message, position) + Notify.ShowHelpText(message, position) +end) + +RegisterNetEvent('community_bridge:Client:HideHelpText', function() + Notify.HideHelpText() end) \ No newline at end of file diff --git a/modules/notify/server.lua b/modules/notify/server.lua index ebf5fbc..fd2c122 100644 --- a/modules/notify/server.lua +++ b/modules/notify/server.lua @@ -2,4 +2,12 @@ Notify = Notify or {} Notify.SendNotify = function(src, message, _type, time) TriggerClientEvent('community_bridge:Client:Notify', src, message, _type, time) +end + +Notify.ShowHelpText = function(src, message, position) + TriggerClientEvent('community_bridge:Client:ShowHelpText', src, message, position) +end + +Notify.HideHelpText = function(src) + TriggerClientEvent('community_bridge:Client:HideHelpText', src) end \ No newline at end of file diff --git a/modules/utility/server/supplement_events.lua b/modules/utility/server/supplement_events.lua index fbe2fa1..11181c0 100644 --- a/modules/utility/server/supplement_events.lua +++ b/modules/utility/server/supplement_events.lua @@ -1,4 +1,4 @@ -RegisterServerEvent("community_bridge:server:alert", function(data) +RegisterNetEvent("community_bridge:server:alert", function(data) local playersByJob = Framework.GetPlayersByJob(data.job) for _, src in pairs(playersByJob) do TriggerClientEvent("community_bridge:client:alert", src, data)