Thread: Ignoring Staff members

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Ignoring Staff members 
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    hey everyone, im trying to make it so players are unable to add staff members to the ignore list ...

    this is what i tried:

    Code:
    	
    	public void add(long name) {
    		Player ignore = PlayerHandler.getPlayerByLongName(name);
    		if(has(name) == (client.getRights().getValue() >= 1 && client.getRights().getValue() <= 3)) {
    			getIgnores().remove(name);
    				if (ignore != null && ignore.getFriends().has(client.getNameAsLong())) {
    					ignore.getPA().sendFriend(client.getNameAsLong(), (byte) 1);
    				}
    			return;
    		}
    		if (getIgnores().size() >= 100) {
    			client.sendMessage("Your ignore list is full.");
    			return;
    		}
    		if (client.getFriends().has(name)) {
    			client.sendMessage("Please remove that player from your friends list first.");
    			return;
    		}
    		if (has(name)) {
    			client.sendMessage("That player is already on your ignore list.");
    			return;
    		}
    		getIgnores().add(name);
    		if (client.getPrivateChat() == Friends.ONLINE) {
    			if (ignore != null && ignore.getFriends().has(client.getNameAsLong())) {
    				ignore.getPA().sendFriend(client.getNameAsLong(), (byte) 0);
    			}
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Retired From RSPS

    iGarrett's Avatar
    Join Date
    Dec 2013
    Posts
    461
    Thanks given
    144
    Thanks received
    110
    Rep Power
    187
    If im looking at this correct you're calling Players with a Rank Value of (1), to be ignored by the script, but you also have adding players with a rank value "Less Than or equal to 3", which would ignore all players with a rank value from 0 - 3 to not get added.

    I havent done this in forever so im not claiming to be correct i'm just analyzing.

    "if(has(name) == (client.getRights().getValue() >= 1 && client.getRights().getValue() <= 3)) {"
    Quote Originally Posted by i am here View Post
    I have never messed with Eclipse. Is it a whole new revision or type of code?
    Quote Originally Posted by bibl View Post
    hahaha, good one m9. "deob" is short for "deobfuscated" which is not the same as decompiled.
    I'm GEEGIN' OUT
    Reply With Quote  
     

  3. #3  
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    Quote Originally Posted by Mara Sov View Post
    If im looking at this correct you're calling Players with a Rank Value of (1), to be ignored by the script, but you also have adding players with a rank value "Less Than or equal to 3", which would ignore all players with a rank value from 0 - 3 to not get added.

    I havent done this in forever so im not claiming to be correct i'm just analyzing.

    "if(has(name) == (client.getRights().getValue() >= 1 && client.getRights().getValue() <= 3)) {"
    yes, the object is to not allow players with rights 1-3 to be added to the ignore list
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Jul 2011
    Posts
    570
    Thanks given
    135
    Thanks received
    142
    Rep Power
    291
    I dont know your methods but:

    if (ignore.getRights() > 0 && ignore.getRights() < 4) {
    client.sendMessage("You can't add staff to the ignore list.");
    return;
    }
    Reply With Quote  
     

  5. Thankful users:


  6. #5  
    Registered Member Rememberm3's Avatar
    Join Date
    Aug 2013
    Posts
    1,716
    Thanks given
    56
    Thanks received
    108
    Rep Power
    129
    Maybe you have to do it like when the list is full, so something like this:
    Code:
    if (ignore.getRights().getValue() >= 1 && ignore.getRights().getValue() <= 3) { 
    Client.sendMessage("sorry, you can't add " + ignore + " to your ignores list");
    Return;
    }
    Not sure if this works.
    Quote me when you reply, so I reply faster.
    Attached image
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    Quote Originally Posted by RememberM3 View Post
    Maybe you have to do it like when the list is full, so something like this:
    Code:
    if (ignore.getRights().getValue() >= 1 && ignore.getRights().getValue() <= 3) { 
    Client.sendMessage("sorry, you can't add " + ignore + " to your ignores list");
    Return;
    }
    Not sure if this works.
    Quote me when you reply, so I reply faster.
    this works, but it still adds the player to the ignore list?
    http://prntscr.com/dpdjpg
    Reply With Quote  
     

  9. #7  
    Registered Member Rememberm3's Avatar
    Join Date
    Aug 2013
    Posts
    1,716
    Thanks given
    56
    Thanks received
    108
    Rep Power
    129
    Did you add the
    Code:
    return;
    ? If you did then send me your skype in an pm
    Reply With Quote  
     

  10. #8  
    sυввч

    Sub's Avatar
    Join Date
    Aug 2007
    Age
    24
    Posts
    4,352
    Thanks given
    1,205
    Thanks received
    359
    Rep Power
    2845
    Quote Originally Posted by mr selby View Post
    this works, but it still adds the player to the ignore list?
    http://prntscr.com/dpdjpg

    You need to make sure the if statement RememberM3 wrote is above this line:
    Code:
    getIgnores().add(name);
    Also make sure that the the 'r' in "Return" is lower case, although the compiler should have brought up this issue.
    Reply With Quote  
     

  11. #9  
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    Quote Originally Posted by Sub View Post
    You need to make sure the if statement RememberM3 wrote is above this line:
    Code:
    getIgnores().add(name);
    Also make sure that the the 'r' in "Return" is lower case, although the compiler should have brought up this issue.

    all of this is done. still adds the name to ignore list
    Reply With Quote  
     

  12. #10  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by mr selby View Post
    all of this is done. still adds the name to ignore list
    Post your current code that you got that involves ignorelist.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    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. Stop closing posts after a staff member posted
    By iPhoneGuy in forum Complaints
    Replies: 23
    Last Post: 07-15-2009, 08:41 AM
  2. The lack of staff members & other's
    By Bruno in forum Complaints
    Replies: 28
    Last Post: 07-12-2009, 12:34 AM
  3. Best Staff Member
    By Vex71Hop in forum Voting
    Replies: 15
    Last Post: 06-29-2009, 10:21 AM
  4. Only allow staff members to wear certian items!
    By haloking in forum Configuration
    Replies: 4
    Last Post: 03-25-2009, 02:36 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
  •