Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player.getAmountOfItemInInv = function(id) {
- let count = 0;
- for(let i = 0; i < 36; i++) {
- if(Player.getInventorySlot(i) == id) {
- count += Player.getInventorySlotCount(i);
- }
- }
- return count;
- }
- //add this on top of your script, then you will be able to use Player.getAmountOfItemInInv(itemId) as a function. :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement