psilocybusmaxim
Member
The problem is I'd like some space in-between my cap: text and the free cap of the player.
Inventory.lua
Skills.lua
Any help would be nice, Thank you!
Inventory.lua
Lua:
function onFreeCapacityChange(player, freeCapacity)
if not freeCapacity then
return
end
if freeCapacity > 99 then
freeCapacity = math.floor(freeCapacity * 10) / 10
end
if freeCapacity > 999 then
freeCapacity = math.floor(freeCapacity)
end
if freeCapacity > 99999 then
freeCapacity = math.min(9999, math.floor(freeCapacity / 1000)) .. "k"
end
capLabel:setText(tr(tostring(math.floor(freeCapacity * 100))))
end
Skills.lua
Lua:
function onFreeCapacityChange(localPlayer, freeCapacity)
setSkillValue("capacity", freeCapacity * 100)
checkAlert("capacity", freeCapacity, localPlayer:getTotalCapacity(), 20)
end
function onTotalCapacityChange(localPlayer, totalCapacity)
checkAlert("capacity", localPlayer:getFreeCapacity(), totalCapacity, 20)
end
Any help would be nice, Thank you!
Last edited: