Thread: Teleport command help donator,all+

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Teleport command help donator,all+ 
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    (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);
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Code:
    if (c.playerRights >= 1 && c.playerRights <= 6) {
    //teleport here
    } else {
    c.sendMessage("You must be a donator to teleport here");
    }
    Reply With Quote  
     

  3. #3  
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by Zivik View Post
    Code:
    if (c.playerRights >= 1 && c.playerRights <= 6) {
    //teleport here
    } else {
    c.sendMessage("You must be a donator to teleport here");
    }
    Thank you!!
    Reply With Quote  
     

  4. #4  
    Registered Member Lust's Avatar
    Join Date
    Oct 2012
    Age
    28
    Posts
    109
    Thanks given
    5
    Thanks received
    4
    Rep Power
    16
    Quote Originally Posted by Zivik View Post
    Code:
    if (c.playerRights >= 1 && c.playerRights <= 6) {
    //teleport here
    } else {
    c.sendMessage("You must be a donator to teleport here");
    }
    You don't need this.
    Code:
    && c.playerRights <= 6


    Reply With Quote  
     

  5. #5  
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by Lust View Post
    You don't need this.
    Code:
    && c.playerRights <= 6
    but the teleport name where shall i put that?

    this is only right and coords?
    Reply With Quote  
     

  6. #6  
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    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")) {
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Feb 2011
    Posts
    1,143
    Thanks given
    545
    Thanks received
    110
    Rep Power
    87
    Quote Originally Posted by Thor Epsilon View Post
    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 (playerCommand.startsWith("train")) {
    c.getPA().spellTeleport(xxxx, yyyy, height);

    xxxx is x coords yyy is y coords
    Reply With Quote  
     

  8. #8  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    723
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    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) {
    Reply With Quote  
     

  9. #9  
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by falconpunch View Post
    if (playerCommand.startsWith("train")) {
    c.getPA().spellTeleport(xxxx, yyyy, height);

    xxxx is x coords yyy is y coords
    yes so whhere i but this if (c.playerRights >= 1 && c.playerRights <= 6) {
    Reply With Quote  
     

  10. #10  
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by kingsnake190 View Post
    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) {
    Did not work i get the } error
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Donator ::bank command help (667)
    By dannyboiii in forum Help
    Replies: 11
    Last Post: 05-25-2012, 06:17 AM
  2. Help with teleport command?
    By sirgodric87 in forum Help
    Replies: 10
    Last Post: 12-20-2011, 06:27 AM
  3. Replies: 25
    Last Post: 08-14-2011, 10:19 PM
  4. [PI] - Help - Donator Teleport - Rep
    By NewCoding in forum Help
    Replies: 6
    Last Post: 10-04-2010, 08:15 PM
  5. [508]Teleport command right 1 help[508]
    By ghostrevan in forum Help
    Replies: 4
    Last Post: 06-28-2010, 12:58 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •