change player. to c.for (int j = 0; j < player.playerEquipment.length; j++) {
if (player.playerEquipment[j] > 0) {
player.sendMessage("Please remove all your equipment before using this.");
return;
}
}
|
Need a check if player is wearing item
example: ::hybrid command it will make character wear hybrid gear, but if player is currently wearing another item they can't do the command.
??? if you understood what i meant lol.
rep++
change player. to c.for (int j = 0; j < player.playerEquipment.length; j++) {
if (player.playerEquipment[j] > 0) {
player.sendMessage("Please remove all your equipment before using this.");
return;
}
}
Something like this..
Code:public boolean checkEmpty(Client c) { for(int i = 0; i < c.playerEquipment.length; i++) { if(c.playerEquipment[i] != -1) { return false; } } return true; } else { return false; } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |