From e4e9ef0fb2a5e4be53bde62116d245fd21cee5d2 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Thu, 15 May 2025 20:02:39 +0100 Subject: [PATCH] add openGrabBox event for items like `murderbag` --- shared/stashcontrol.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/shared/stashcontrol.lua b/shared/stashcontrol.lua index c6256e2..8a1cb2c 100644 --- a/shared/stashcontrol.lua +++ b/shared/stashcontrol.lua @@ -565,3 +565,19 @@ if isServer() then registerStash(name, label, slots, weight, owner, coords) end) end + +RegisterNetEvent(getScript()..":openGrabBox", function(data) + if isStarted(OXInv) then + return + end + local id = "" + if data.metadata then + id = data.metadata.id + elseif data.info then + id = data.info.id + end + openStash({ + stash = id, + coords = GetEntityCoords(PlayerPedId()) + }) +end) \ No newline at end of file