From 4a3fb8db4d38af78d97ae3f055c5f1f424d7e2fc Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Sat, 7 Jun 2025 19:50:34 +0100 Subject: [PATCH] Add "support" for CodeM shops This is a tricky one to support They handle their shops inside their script with no way to add one from the outside They give the ability to trigger a shop from outside the script, but not create one This just adds that trigger for now --- shared/shops.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/shops.lua b/shared/shops.lua index 5e686b6..7cd3edd 100644 --- a/shared/shops.lua +++ b/shared/shops.lua @@ -164,12 +164,16 @@ function openShop(data) elseif isStarted(OXInv) then exports[OXInv]:openInventory('shop', { type = data.shop }) - elseif isStarted(QSInv) or isStarted(CodeMInv) then + elseif isStarted(QSInv) then TriggerServerEvent("inventory:server:OpenInventory", "shop", data.items.label, data.items) elseif isStarted(TgiannInv) then TriggerServerEvent(getScript()..':server:openServerShop', data.shop) + elseif isStarted(CodeMInv) then + --print(data.shop) + TriggerEvent("codem-inventory:openshop", data.shop) + elseif isStarted(QBInv) then if QBInvNew then TriggerServerEvent(getScript()..':server:openServerShop', data.shop)