mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 22:36:04 +01:00
dupewarn info addition
This commit is contained in:
@@ -584,11 +584,11 @@ function ConsumeSuccess(itemName, type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function addItem(item, amount, info)
|
function addItem(item, amount, info)
|
||||||
TriggerServerEvent(GetCurrentResourceName()..":server:toggleItem", true, item, amount)
|
TriggerServerEvent(GetCurrentResourceName()..":server:toggleItem", true, item, amount, nil, info)
|
||||||
end
|
end
|
||||||
|
|
||||||
function removeItem(item, amount)
|
function removeItem(item, amount)
|
||||||
TriggerServerEvent(GetCurrentResourceName()..":server:toggleItem", false, item, amount)
|
TriggerServerEvent(GetCurrentResourceName()..":server:toggleItem", false, item, amount, nil, info)
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterNetEvent(GetCurrentResourceName()..":server:toggleItem", function(give, item, amount, newsrc)
|
RegisterNetEvent(GetCurrentResourceName()..":server:toggleItem", function(give, item, amount, newsrc)
|
||||||
@@ -650,7 +650,7 @@ RegisterNetEvent(GetCurrentResourceName()..":server:toggleItem", function(give,
|
|||||||
print("^4ERROR^7: ^2No Inventory detected ^7- ^2Check ^3exports^1.^2lua^7")
|
print("^4ERROR^7: ^2No Inventory detected ^7- ^2Check ^3exports^1.^2lua^7")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
dupeWarn(src, item) -- if not boot the player
|
dupeWarn(src, item, amount) -- if not boot the player
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local amount = amount and amount or 1
|
local amount = amount and amount or 1
|
||||||
@@ -705,10 +705,10 @@ RegisterNetEvent(GetCurrentResourceName()..":server:toggleItem", function(give,
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
--Item Exploit protection
|
--Item Exploit protection
|
||||||
function dupeWarn(src, item)
|
function dupeWarn(src, item, amount)
|
||||||
print("^5DupeWarn^7: (^1"..tostring(src).."^7) ^2Tried to remove item ^7('^3"..item.."^7')^2 but it wasn't there^7")
|
print("^5DupeWarn^7: (^1"..tostring(src).."^7) ^2Tried to remove item ^7('^3"..item.."^7')^2 but it wasn't there^7")
|
||||||
if Config.System.Debug == false then
|
if Config.System.Debug == false then
|
||||||
DropPlayer(src, src.." ^1Kicked for attempting to duplicate items")
|
DropPlayer(src, src.." ^1Kicked for suspected duplicating items:"..item)
|
||||||
end
|
end
|
||||||
print("^5DupeWarn:^7: (^1"..tostring(src).."^7) ^2Dropped from server - exploit protection detected an item not being found in players inventory^7")
|
print("^5DupeWarn:^7: (^1"..tostring(src).."^7) ^2Dropped from server - exploit protection detected an item not being found in players inventory^7")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user