Try this.Code:if ((ShopID != 81 ||ShopID != 33) && c.playerRights == 5) { c.getDH().sendStatement("you're an iron man sorry"); return; }
|
Hello,
How can I make an exception for iron man to open 2-3 shops.
I've got this currently in my OpenShop method
How would I make it so, they can open another shop ID such as Shop ID 33?if (ShopID != 81 && c.playerRights == 5) {
c.getDH().sendStatement("you're an iron man sorry");
return;
}
Thanks in advance
Try this.Code:if ((ShopID != 81 ||ShopID != 33) && c.playerRights == 5) { c.getDH().sendStatement("you're an iron man sorry"); return; }
Code:if (c.playerRights == 5 && ShopID != 81 || ShopID != 33) { c.getDH().sendStatement("you're an iron man sorry"); return; }
mhm?public void openShop(int ShopID){
if (c.playerRights == 5 && ShopID == 81 || ShopID == 33) {
c.getDH().sendStatement("You cannot perform this action.");
return;
}
c.getItems().resetItems(3823);
resetShop(ShopID);
c.isShopping = true;
c.myShopId = ShopID;
c.getPA().sendFrame248(3824, 3822);
c.getPA().sendFrame126(ShopHandler.ShopName[ShopID], 3901);
}
The code you just posted, would check to see if they are iron man and specifically not allow them to open the shops with those IDs.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |