add openGrabBox event for items like murderbag

This commit is contained in:
Jim Shield
2025-05-15 20:02:39 +01:00
parent ada724069b
commit e4e9ef0fb2

View File

@@ -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)