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
This commit is contained in:
Jim Shield
2025-10-24 21:40:26 +01:00
parent 960f73ad6d
commit 27a0e147fb

View File

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