|
-really need it its important.-
Currently my code does this the first Item in the Slot
How do i make it choose the item i clicked on?
Pretending my code is this
How would i make it choose the specific slot rather then the first slot in my inventory?Code:deleteItem(delete, getItemSlot(delete), 1);
Code:public int getItemSlot(int itemID) { for (int slot = 0; slot < playerItems.length; slot++) { if (playerItems[slot] == (itemID + 1)) { return slot; } } return -1; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |