Thread: Help with a 317 pi

Results 1 to 4 of 4
  1. #1 Help with a 317 pi 
    Registered Member
    Join Date
    Jan 2016
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    i need a c.playerRights that only allows 1,2 ,3 and 6
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2012
    Posts
    4,722
    Thanks given
    1,684
    Thanks received
    1,102
    Rep Power
    0
    What?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2016
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    my right number are
    1- Moderator
    2- Administrator
    3- Co-Owner
    4- Donator
    5- Sponsor
    6- Owner
    7- Veteran
    8- Trusted
    9- Helper
    and im trying to make a staffzone only for certain rank

    something like
    if (playerCommand.equals("staffzone") && (c.playerRights == 1)) {
    c.getPA().startTeleport(xxxx, yyyy, 0, "modern");
    }
    if (playerCommand.equals("staffzone") && (c.playerRights == 2)) {
    c.getPA().startTeleport(xxxx, yyyy, 0, "modern");
    }
    if (playerCommand.equals("staffzone") && (c.playerRights == 3)) {
    c.getPA().startTeleport(xxxx, yyyy, 0, "modern");
    }
    if (playerCommand.equals("staffzone") && (c.playerRights == 6)) {
    c.getPA().startTeleport(xxxx, yyyy, 0, "modern");
    but simpler
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Oct 2012
    Posts
    4,722
    Thanks given
    1,684
    Thanks received
    1,102
    Rep Power
    0
    Combine all rights in a boolean and do isStAff?

    Boolean isStaff playerrights >=2 && rights <= 3 || rights == 4;

    Code:
    public boolean isStaff() {
    return c.playerRights  >= 1 && c.playerRights <= 3 || c.playerRights == 6;
    }
    Code:
    if (playerCommand.equals("staffzone") && c.isStaff()) {
    c.getPA().startTeleport(xxxx, yyyy, 0, "modern");
    }
    Reply With Quote  
     


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. Help with cache 317 PI
    By CrimsonGFX in forum Help
    Replies: 3
    Last Post: 11-20-2014, 10:48 PM
  2. need help with doors 317 pi
    By barrag3 in forum Help
    Replies: 1
    Last Post: 04-08-2014, 01:35 AM
  3. Need help with a 317 PI Webclient.
    By Jonathon1337 in forum Requests
    Replies: 5
    Last Post: 05-15-2013, 09:52 AM
  4. Please help with ::mypos 317 (PI)
    By StayPutMan in forum Help
    Replies: 5
    Last Post: 03-06-2013, 04:27 AM
  5. help with my 317 pi webclient
    By Rifblood in forum Help
    Replies: 1
    Last Post: 11-19-2011, 05:19 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •