silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,484
- Solutions
- 9
- Reaction score
- 217
SOLVED!
hello folks, I'm trying figure out how check the capacity the player, to give or not a item to him, but I don't know how make it, I try it:
thanks in advice.
hello folks, I'm trying figure out how check the capacity the player, to give or not a item to him, but I don't know how make it, I try it:
Code:
local cap = player:getFreeCapacity()
if cap > itemType:getWeight() then
bag:addItem(itemType:getId(), 1, INDEX_WHEREEVER, FLAG_NOLIMIT)
else
-- some code msg
end
Last edited: