mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
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:
@@ -1656,6 +1656,10 @@ RegisterNetEvent(getScript()..":server:toggleItem", function(give, item, amount,
|
|||||||
|
|
||||||
local invName = ""
|
local invName = ""
|
||||||
if give == 0 or give == false then
|
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
|
if not hasItem(item, amount or 1, src) then
|
||||||
dupeWarn(src, item, amount)
|
dupeWarn(src, item, amount)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user