mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-11-22 19:48:33 +00: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:
1 parent
1623feacf1
commit
31633bc61d
3 files changed
+82
-14
No files matched your search
@@ -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