Code:if (c.playerRights >= 1 && c.playerRights <= 6) { //teleport here } else { c.sendMessage("You must be a donator to teleport here"); }
|
(317/474 biohazard base)
My donator rank is in player right 4,5,6
and i want playerright 1,2,3,4,5,6 to teleport to :onatorzone
I don't want the regular players to tele to :onatorzone too.. please help to make the tele only for playerright 1-6
A tele command from my commands.java
if (playerCommand.startsWith("train")) {
c.getPA().spellTeleport(2670, 3712, 0);
}
Now my command look like this:
if (c.playerRights >= 1 && c.playerRights <= 6) {
c.getPA().spellTeleport(2670, 3712, 0);
} else {
c.sendMessage("You must be a donator to teleport here");
}
Where shall i put
if (playerCommand.startsWith("train")) {
if (c.playerRights >= 1 && c.playerRights <= 6) {
if (playerCommand.startsWith("train")) {
c.getPA().spellTeleport(2670, 3712, 0);
}
} else {
c.sendMessage("You must be a donator to teleport here");
}
If you just want the donators to have the command only for donators, and not for staff then just do if (c.playerRights == 6) {
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |