silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 212
hello folks, I'm trying make players can carry just ONE item...
so I try it:
but using it I got this:
1 - if the player not have the ITEM_ID on your backpack or inventory he can move the item to anywhere
2 - if the player have the ITEM_ID on your backpack or inventory he can't move the item to anywhere
so I need to able players move the ITEM_ID to depot, house etc while are holding one the item in your backpack or inventory, but not move more than one item to your backpack
so I try it:
Code:
if item:getTopParent() ~= self and item:getId() == ITEM_ID then
if player:getItemCount(ITEM_ID) >= 1 then
self:sendCancelMessage('You cannot hold more balls.')
end
end
1 - if the player not have the ITEM_ID on your backpack or inventory he can move the item to anywhere
2 - if the player have the ITEM_ID on your backpack or inventory he can't move the item to anywhere
so I need to able players move the ITEM_ID to depot, house etc while are holding one the item in your backpack or inventory, but not move more than one item to your backpack
Last edited: