From ac9721307354aedc583c7feba03e3bc87063ce5f Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Tue, 26 Mar 2024 01:38:38 +0100 Subject: [PATCH] refactor: (bpt_wallet) await callbacks --- .../resources/[bpt_addons]/bpt_wallet/client/client.lua | 2 +- .../resources/[bpt_addons]/bpt_wallet/server/server.lua | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server-data/resources/[bpt_addons]/bpt_wallet/client/client.lua b/server-data/resources/[bpt_addons]/bpt_wallet/client/client.lua index 6e85cb2f7..189955b3b 100644 --- a/server-data/resources/[bpt_addons]/bpt_wallet/client/client.lua +++ b/server-data/resources/[bpt_addons]/bpt_wallet/client/client.lua @@ -10,7 +10,7 @@ local function RemoveWal() WalEquipped = nil end -AddEventHandler('ox_inventory:updateInventory', function(changes) +RegisterNetEvent('ox_inventory:updateInventory', function(changes) if justConnect then Wait(4500) justConnect = nil diff --git a/server-data/resources/[bpt_addons]/bpt_wallet/server/server.lua b/server-data/resources/[bpt_addons]/bpt_wallet/server/server.lua index 41cf4f65f..41a688399 100644 --- a/server-data/resources/[bpt_addons]/bpt_wallet/server/server.lua +++ b/server-data/resources/[bpt_addons]/bpt_wallet/server/server.lua @@ -24,8 +24,7 @@ local function GenerateSerial(text) ) end -RegisterServerEvent("bpt_wallet:openWallet") -AddEventHandler("bpt_wallet:openWallet", function(identifier) +RegisterServerEvent("bpt_wallet:openWallet", function(identifier) if not registeredStashes[identifier] then ox_inventory:RegisterStash( "wal_" .. identifier,