mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
crafting exploit fixes
This has several changes When crafting, it now checks if the inventory is open and stops crafting dead and warns the player with a print. Multicraft now checks if you have space in your inventory for the items and limits the max amount craftable Also fixes the "title" of the qb-input box when crafting Also changed the anim flag for the "placing items" to hopefully keep you in place
This commit is contained in:
@@ -698,6 +698,26 @@ if isServer() then
|
||||
return result
|
||||
end)
|
||||
|
||||
createCallback(getScript()..":server:getMaxCarryCraft", function(source, data)
|
||||
local src = source
|
||||
local item = data.item
|
||||
local max = data.max or 100
|
||||
|
||||
local maxCanCarry = 0
|
||||
for i = 1, max do
|
||||
local checkTable = {
|
||||
[item] = i
|
||||
}
|
||||
local result = canCarry(checkTable, src)
|
||||
if result[item] == true then
|
||||
maxCanCarry = i
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
return maxCanCarry
|
||||
end)
|
||||
|
||||
local AuthEvent = getScript()..":"..keyGen()..keyGen()..keyGen()..keyGen()..":"..keyGen()..keyGen()..keyGen()..keyGen()
|
||||
validTokens = validTokens or {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user