PDA

View Full Version : Need Help on ::Pickup/::Item command



Ekins100
June 25th, 2010, 01:18
Problem : I am playerrights 3, it worked before but then it stopped working...
Any suggestions



if (command.startsWith("item") && playerRights > 3) {
String[] args = command.split(" ");
if(args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if (newItemID <= 160000 && newItemID >= 0) {
addItem(newItemID, newItemAmount);
} else {
sM("No such item.");
}
} else {
sM("Type like this ::item ID AMOUNT");
}

pureranga
June 25th, 2010, 01:22
playerRights > 3) means must be more than 3 playerRights add playerRights >= 3) or playerRights > 2)

Peter
June 25th, 2010, 01:25
if (command.startsWith("item") && playerRights >= 3) {
String[] args = command.split(" ");
if(args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if (newItemID <= 160000 && newItemID >= 0) {
addItem(newItemID, newItemAmount);
} else {
sM("No such item.");
}
} else {
sM("Type like this ::item ID AMOUNT");
}
should work now

pureranga
June 25th, 2010, 01:25
Did i not just say that? don't spoon feed him.