|
Code:if (c.playerRights >= 1 && c.playerRights <= 0) { if (playerCommand.equals("jad")) { c.getPA().startTeleport(2480, 5175, 0, "modern"); c.sendMessage("Kill Jad and get you'r firecape");
I dont understand why normal players can't use the command, when player_rights is = 0.
just change the 1 to 0 l0l..
Well, everyone starts somewhere.
OT: You have your command set to if your rights are greater than 1, and less than 0, then you can run this command. Thus why your command won't work.
This one will work for anyone with the rights of 0 and higher.
Code:if (c.playerRights >= 0) { if (playerCommand.equals("jad")) { c.getPA().startTeleport(2480, 5175, 0, "modern"); c.sendMessage("Kill Jad and get your firecape"); } }
Code:if (c.playerRights >= 0) { if (playerCommand.equals("jad")) { c.getPA().startTeleport(2480, 5175, 0, "modern"); c.sendMessage("Kill Jad and get your firecape");
Now i can use it, but im owner. Normal Players, they can't use it.
Try this one.
Code:if (playerCommand.equals("jad") && (c.playerRights >= 0)) { c.getPA().startTeleport(2480, 5175, 0, "modern"); c.sendMessage("Kill Jad and get your firecape"); }
What you're doing here is sayingCode:if (c.playerRights >= 1 && c.playerRights <= 0) { if (playerCommand.equals("jad")) { c.getPA().startTeleport(2480, 5175, 0, "modern"); c.sendMessage("Kill Jad and get you'r firecape");If the playerRights are greater than or equal to 1 and their rights are also less than or equal to 0. You would pretty much have to switch it so itsCode:if (c.playerRights >= 1 && c.playerRights <= 0) {
the playerRights are greater or equal to 0 and are less than or equal to 1. Meaning Mods and Normal Players can use it.Code:if (c.playerRights >= 0 && c.playerRights <= 1) {
You mght of misplaced it where your owner rights is being checked.
I don't understand why you don't just do
What you said above says if you are player rights of 1 or higher AND you are player rights of 0 and less.. Which makes no sense.Code:if (playerCommand.equals("jad")) { c.getPA().startTeleport(2480, 5175, 0, "modern"); c.sendMessage("Kill Jad and get you'r firecape");
I would recommend checking this out.
Java - Basic Operators
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |