Compare commits

...

3 Commits

Author SHA1 Message Date
Jim Shield
6166314cbf fix ox_inv current inventory weight check 2025-09-23 15:05:46 +01:00
Jim Shield
9fa8f58cfb Make ox_lib progressbars actually return false
I think this was causing progressbars to return true instead of `nil/false` somehow
this *should* make it more certain
2025-09-23 14:59:16 +01:00
Jim Shield
ed997ad8a2 fix typo breaking qb-core /commands 2025-09-23 12:00:40 +01:00
3 changed files with 4 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ local InvFunc = {
local weight = 0 local weight = 0
local itemcheck = getPlayerInv(src) local itemcheck = getPlayerInv(src)
for _, v in pairs(itemcheck) do for _, v in pairs(itemcheck) do
weight += ((v.weight * v.amount) or 0) weight += ((v.weight * (v.amount or v.count)) or 0)
end end
return weight return weight
end, end,

View File

@@ -52,7 +52,7 @@ local progressFunc = {
if exports[OXLibExport]:progressBar(options) then if exports[OXLibExport]:progressBar(options) then
return true return true
else else
print("^1progressBar was not successful") return false
end end
end end
end, end,

View File

@@ -1,4 +1,3 @@
--- Registers a command with the active command system. --- Registers a command with the active command system.
--- This function supports multiple command systems (OXLib, qb-core, ESX Legacy). --- This function supports multiple command systems (OXLib, qb-core, ESX Legacy).
--- ---
@@ -47,7 +46,7 @@ function registerCommand(command, options)
optionTable.helpInfo, optionTable.helpInfo,
optionTable.subText, optionTable.subText,
optionTable.argsRequired, optionTable.argsRequired,
optionTable.funt, optionTable.funct,
optionTable.restriction or nil optionTable.restriction or nil
) )
@@ -57,7 +56,7 @@ function registerCommand(command, options)
optionTable.helpInfo, optionTable.helpInfo,
optionTable.subText, optionTable.subText,
optionTable.argsRequired, optionTable.argsRequired,
optionTable.funt, optionTable.funct,
optionTable.restriction or nil optionTable.restriction or nil
) )