Thread: Player Rights.

Results 1 to 10 of 10
  1. #1 Player Rights. 
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Hello, just recently I got Simplicitys base located here: http://www.rune-server.org/runescape...much-more.html

    So basically, I set myself to owner in my character file, But some commands ONLY work for the owner of the source.

    His username is AJ and some commands only work for him

    FOR EXAMPLE:


    Code:
    if (playerCommand.startsWith("givepoints")) {
    				String[] args = playerCommand.split(" ", 3);
    				int amountPoints = Integer.parseInt(args[1]);
    				String pointsTo = (args[2].replace("_", " ")); 
    				for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    					if(PlayerHandler.players[i] != null) {
    						if(PlayerHandler.players[i].playerName.equalsIgnoreCase(pointsTo)) {
    							Client c2 = (Client)PlayerHandler.players[i];
    							c2.interbellumPoints += amountPoints;
    							c2.totalInterbellumPoints += amountPoints;
    							c2.getPA().sendFrame126("@lre@Interbellum points: @gre@"+c2.interbellumPoints+"("+c2.totalInterbellumPoints+")", 29167);
    							c.sendMessage("Gave "+amountPoints+" points, he currently has "+c2.interbellumPoints+" points.");
    							break;
    						} 
    					}
    				}
    			}
    This command ONLY works for the account AJ along with MANY others and I don't see why!

    Where can I switch it over to my user?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2014
    Posts
    145
    Thanks given
    23
    Thanks received
    8
    Rep Power
    11
    give me the entire commands.java over www.pastebin.com
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by RunePkers View Post
    give me the entire commands.java over Pastebin.com - #1 paste tool since 2002!
    I searched for Pointsto and the only pointsto is located in commands.java -- ??
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Feb 2011
    Posts
    1,143
    Thanks given
    545
    Thanks received
    110
    Rep Power
    87
    Quote Originally Posted by Balaney View Post
    Hello, just recently I got Simplicitys base located here: http://www.rune-server.org/runescape...much-more.html

    So basically, I set myself to owner in my character file, But some commands ONLY work for the owner of the source.

    His username is AJ and some commands only work for him

    FOR EXAMPLE:


    Code:
    if (playerCommand.startsWith("givepoints")) {
    				String[] args = playerCommand.split(" ", 3);
    				int amountPoints = Integer.parseInt(args[1]);
    				String pointsTo = (args[2].replace("_", " ")); 
    				for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    					if(PlayerHandler.players[i] != null) {
    						if(PlayerHandler.players[i].playerName.equalsIgnoreCase(pointsTo)) {
    							Client c2 = (Client)PlayerHandler.players[i];
    							c2.interbellumPoints += amountPoints;
    							c2.totalInterbellumPoints += amountPoints;
    							c2.getPA().sendFrame126("@lre@Interbellum points: @gre@"+c2.interbellumPoints+"("+c2.totalInterbellumPoints+")", 29167);
    							c.sendMessage("Gave "+amountPoints+" points, he currently has "+c2.interbellumPoints+" points.");
    							break;
    						} 
    					}
    				}
    			}
    This command ONLY works for the account AJ along with MANY others and I don't see why!

    Where can I switch it over to my user?
    There's probably a line far above that has something like if ((c.username("AJ") || (c.username("Second guys name")) {

    Then all of those commands are in the middle

    }

    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by falconpunch View Post
    There's probably a line far above that has something like if ((c.username("AJ") || (c.username("Second guys name")) {

    Then all of those commands are in the middle

    }
    Im not finding anything, do you have skype? so we can teamview? or can anyone help me out?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by RunePkers View Post
    give me the entire commands.java over Pastebin.com - #1 paste tool since 2002!
    package server.model.players.packets; import server.Config; import server.Co - Pastebin.com

    and yes I know some commands say if (c.playerName.equalsIgnoreCase("aj") -- I know how to fix that, just not the
    ::givepoints and other commands without that
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jan 2014
    Posts
    145
    Thanks given
    23
    Thanks received
    8
    Rep Power
    11
    Quote Originally Posted by Balaney View Post
    package server.model.players.packets; import server.Config; import server.Co - Pastebin.com

    and yes I know some commands say if (c.playerName.equalsIgnoreCase("aj") -- I know how to fix that, just not the
    ::givepoints and other commands without that
    Quite weird indeed, Have you looked through your client files to see perhaps it's blocking it client-sided?
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    No I havent.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jan 2014
    Posts
    145
    Thanks given
    23
    Thanks received
    8
    Rep Power
    11
    Quote Originally Posted by Balaney View Post
    No I havent.
    Check it.
    Reply With Quote  
     

  10. #10  
    Donator

    Join Date
    Oct 2013
    Posts
    345
    Thanks given
    206
    Thanks received
    59
    Rep Power
    38
    Just search for "Aj" in your command class and change it to your igname name, if that doesn't work hit me a pm with your tv details.

    Edit: fixed
    Reply With Quote  
     

  11. Thankful user:



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. player rights [esp]
    By Vox' in forum Help
    Replies: 5
    Last Post: 04-30-2009, 12:22 AM
  2. 508 crown player rights
    By nobiwa in forum Help
    Replies: 1
    Last Post: 04-16-2009, 04:52 PM
  3. Player Rights (easy rep++)
    By waffl3z0wnu in forum Help
    Replies: 3
    Last Post: 03-17-2009, 09:20 PM
  4. player rights to wear an item "short tut"
    By Icy Whip in forum Tutorials
    Replies: 1
    Last Post: 03-11-2008, 04:38 AM
  5. Easy Player Rights Adjustment
    By BADBOY OWNS in forum Tutorials
    Replies: 4
    Last Post: 08-04-2007, 07:54 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
  •