Thread: help with givedonator command

Results 1 to 8 of 8
  1. #1 help with givedonator command 
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    I see ::givedonator is coded in commands.java but it dont work.. any clue?
    here the coding of it..

    }
    if (playerCommand.startsWith("givedonator")) {
    try {
    String playerToAdmin = playerCommand.substring(10);
    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    if(Server.playerHandler.players[i] != null) {
    if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToAdmin)) {
    Client c2 = (Client)Server.playerHandler.players[i];
    c2.sendMessage("You have been given donator status by " + c.playerName);
    c2.playerRights = 3;
    c2.memberStatus = 1;
    c2.donPoints += 50;
    c2.logout();
    break;
    }
    }
    }
    } catch(Exception e) {
    c.sendMessage("Player Must Be Offline.");
    }
    }
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2011
    Age
    28
    Posts
    1,880
    Thanks given
    311
    Thanks received
    557
    Rep Power
    703
    change

    String playerToAdmin = playerCommand.substring(10);

    to

    String playerToAdmin = playerCommand.substring(12);
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    Quote Originally Posted by Revival View Post
    change

    String playerToAdmin = playerCommand.substring(10);

    to

    String playerToAdmin = playerCommand.substring(12);
    didnt work
    Reply With Quote  
     

  4. #4  
    Middle Finger is Here


    Join Date
    Feb 2012
    Age
    31
    Posts
    2,546
    Thanks given
    377
    Thanks received
    502
    Rep Power
    162
    Quote Originally Posted by account94 View Post
    I see ::givedonator is coded in commands.java but it dont work.. any clue?
    here the coding of it..

    }
    if (playerCommand.startsWith("givedonator")) {
    try {
    String playerToAdmin = playerCommand.substring(10);
    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    if(Server.playerHandler.players[i] != null) {
    if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToAdmin)) {
    Client c2 = (Client)Server.playerHandler.players[i];
    c2.sendMessage("You have been given donator status by " + c.playerName);
    c2.playerRights = 3;
    c2.memberStatus = 1;
    c2.donPoints += 50;
    c2.logout();
    break;
    }
    }
    }
    } catch(Exception e) {
    c.sendMessage("Player Must Be Offline.");
    }
    }

    try this

    Code:
    String name = playerCommand.substring(10);
    				for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    					if (Server.playerHandler.players[i] != null) {
    						if (Server.playerHandler.players[i].playerName
    								.equalsIgnoreCase(name)) {
    							Server.playerHandler.players[i].playerRights = 4;
    							Server.playerHandler.players[i].memberStatus = 1;
    							((Client) Server.playerHandler.players[i]).getPA()
    							.requestUpdates();
    						}
    					}
    				}
    			}
    Hi
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    Quote Originally Posted by Braveyy View Post
    try this

    Code:
    String name = playerCommand.substring(10);
    				for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    					if (Server.playerHandler.players[i] != null) {
    						if (Server.playerHandler.players[i].playerName
    								.equalsIgnoreCase(name)) {
    							Server.playerHandler.players[i].playerRights = 4;
    							Server.playerHandler.players[i].memberStatus = 1;
    							((Client) Server.playerHandler.players[i]).getPA()
    							.requestUpdates();
    						}
    					}
    				}
    			}

    Still wont work...

    BUMP
    Reply With Quote  
     

  6. #6  
    Middle Finger is Here


    Join Date
    Feb 2012
    Age
    31
    Posts
    2,546
    Thanks given
    377
    Thanks received
    502
    Rep Power
    162
    Quote Originally Posted by account94 View Post
    Still wont work...

    BUMP
    Then you have some other issues then the command because that command should work fine.
    Hi
    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    can you help me from teamview?
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    bump
    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 Master Command.
    By pkerz noob in forum Help
    Replies: 5
    Last Post: 02-15-2009, 10:35 AM
  2. Need help with clientside commands
    By Colby in forum Help
    Replies: 5
    Last Post: 01-26-2009, 05:08 AM
  3. Need help with a command..
    By W x 3 in forum Help
    Replies: 10
    Last Post: 10-27-2008, 08:35 PM
  4. Help With "Run (Command Runner)"
    By Tnt Pk in forum Software
    Replies: 2
    Last Post: 05-22-2008, 10:42 PM
  5. [REQ] Help with a Command Prompt...
    By Cky Poons in forum Chat
    Replies: 2
    Last Post: 03-24-2008, 07:08 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •