From 92ad96e4350eef3788a0a9f4746306c8007de330 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Wed, 24 Sep 2025 11:59:44 +0100 Subject: [PATCH] Redo math for ox_inv get player current inv weight --- shared/itemcontrol.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/itemcontrol.lua b/shared/itemcontrol.lua index e24a6be..5b303d8 100644 --- a/shared/itemcontrol.lua +++ b/shared/itemcontrol.lua @@ -56,7 +56,7 @@ local InvFunc = { local weight = 0 local itemcheck = getPlayerInv(src) for _, v in pairs(itemcheck) do - weight += ((v.weight * (v.amount or v.count)) or 0) + weight += v.weight end return weight end, @@ -2516,7 +2516,7 @@ end --- ``` function sellAnim(data, token) 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 end