mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 14:56:02 +01:00
fix multicraft for qb-input side
I forgot to correct the result as qb-input returns strings, this fixes that Also added a fallback for if the user deletes the value and tries to craft `nil`
This commit is contained in:
@@ -251,6 +251,10 @@ function multiCraft(data)
|
|||||||
|
|
||||||
end
|
end
|
||||||
if Config.System.Menu == "qb" then
|
if Config.System.Menu == "qb" then
|
||||||
|
if dialog["amount"] == nil or dialog["amount"] == "" then
|
||||||
|
dialog["amount"] = 1
|
||||||
|
end
|
||||||
|
dialog["amount"] = tonumber(dialog["amount"])
|
||||||
if dialog["amount"] > max or dialog["amount"] < 1 or dialog["amount"] == nil or dialog["amount"] == "" then
|
if dialog["amount"] > max or dialog["amount"] < 1 or dialog["amount"] == nil or dialog["amount"] == "" then
|
||||||
triggerNotify(nil, "Invalid Amount", "error")
|
triggerNotify(nil, "Invalid Amount", "error")
|
||||||
craftingMenu(data)
|
craftingMenu(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user