mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
Redo math for ox_inv get player current inv weight
This commit is contained in:
@@ -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 v.count)) or 0)
|
weight += v.weight
|
||||||
end
|
end
|
||||||
return weight
|
return weight
|
||||||
end,
|
end,
|
||||||
@@ -2516,7 +2516,7 @@ end
|
|||||||
--- ```
|
--- ```
|
||||||
function sellAnim(data, token)
|
function sellAnim(data, token)
|
||||||
if not hasItem(data.item, 1) then
|
if not hasItem(data.item, 1) then
|
||||||
triggerNotify(nil, Loc[Config.Lan].error["dont_have"].." "..getItemLabel(data.item), "error")
|
triggerNotify(nil, (Loc[Config.Lan].error["dont_have"] or "You don't have any") .." "..getItemLabel(data.item), "error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user