From 27a0e147fb0d3529189f981ebf7efba633901a24 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Fri, 24 Oct 2025 21:40:26 +0100 Subject: [PATCH] Add exploit check for removing items Add a check for if a person is attempting to trigger remove minus of an item (possibly trying to give them selves items) this will stop it in its tracks and warn the server console what happened --- shared/itemcontrol.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/itemcontrol.lua b/shared/itemcontrol.lua index 742da27..c7ed0a6 100644 --- a/shared/itemcontrol.lua +++ b/shared/itemcontrol.lua @@ -1656,6 +1656,10 @@ RegisterNetEvent(getScript()..":server:toggleItem", function(give, item, amount, local invName = "" if give == 0 or give == false then + if remamount < 0 then + print("^1Error^7: ^7src - ^1Client tried to remove a minus number of item ^7- "..item) + return + end if not hasItem(item, amount or 1, src) then dupeWarn(src, item, amount)