From d3035efd5c654b4ec25b775cc8c0143ef765d52d Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Tue, 3 Jun 2025 16:56:56 +0100 Subject: [PATCH] breakout from inventory exploit during crafting --- shared/crafting.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shared/crafting.lua b/shared/crafting.lua index aac352d..f2507f3 100644 --- a/shared/crafting.lua +++ b/shared/crafting.lua @@ -334,6 +334,10 @@ function makeItem(data) if isInventoryOpen() then print("^1Error^7: ^2Inventory is open, you tried to break things") crafted, crafting = false, false + stopTempCam() + ClearPedTasks(PlayerPedId()) + if canReturn then craftingMenu(data) end + CraftLock = false return end if crafting and progressBar({ @@ -353,10 +357,15 @@ function makeItem(data) Wait(200) end if isInventoryOpen() then - --print("^1Error^7: ^2Inventory is open, you tried to break things") - crafted, crafting, CraftLock = false, false, false + print("^1Error^7: ^2Inventory is open, you tried to break things") + crafted, crafting = false, false + stopTempCam() + ClearPedTasks(PlayerPedId()) + if canReturn then craftingMenu(data) end + CraftLock = false return end + if crafted then local craftProp = nil if prop then