Thread: Hey can someone help me with commands on PI?

Results 1 to 9 of 9
  1. #1 Hey can someone help me with commands on PI? 
    Registered Member
    Join Date
    Sep 2010
    Posts
    104
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    Hey i need help with a few things that other forums could not help with='(
    i cant seem to get vengance to work, and i cant get IPMute to work or Mute,
    and i need to know how to add ::kick and ::xteletome can someone please help me!='( ill add my mute and ip mute commands in here...

    if (playerCommand.startsWith("mute") && c.playerRights >= 1) {
    try {
    String playerToBan = playerCommand.substring(5);
    Connection.addNameToMuteList(playerToBan);
    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    if(Server.playerHandler.players[i] != null) {
    if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    Client c2 = (Client)Server.playerHandler.players[i];
    c2.sendMessage("You have been muted by: " + c.playerName);
    break;
    }
    }
    }
    } catch(Exception e) {
    c.sendMessage("Player Must Be Offline.");
    }
    }



    if (playerCommand.startsWith("ipmute") && c.playerRights >= 2) {
    try {
    String playerToBan = playerCommand.substring(7);
    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    if(Server.playerHandler.players[i] != null) {
    if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    Connection.addIpToMuteList(Server.playerHandler.pl ayers[i].connectedFrom);
    c.sendMessage("You have IP Muted the user: "+Server.playerHandler.players[i].playerName);
    Client c2 = (Client)Server.playerHandler.players[i];
    c2.sendMessage("You have been muted by: " + c.playerName);
    break;
    }
    }
    }
    } catch(Exception e) {
    c.sendMessage("Player Must Be Offline.");
    }
    }



    if (playerCommand.startsWith("unipmute") && c.playerRights >= 2) {
    try {
    String playerToBan = playerCommand.substring(9);
    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    if(Server.playerHandler.players[i] != null) {
    if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    Connection.unIPMuteUser(Server.playerHandler.playe rs[i].connectedFrom);
    c.sendMessage("You have Un Ip-Muted the user: "+Server.playerHandler.players[i].playerName);
    break;
    }
    }
    }
    } catch(Exception e) {
    c.sendMessage("Player Must Be Offline.");
    }
    }



    if (playerCommand.startsWith("unmute") && c.playerRights >= 1) {
    try {
    String playerToBan = playerCommand.substring(7);
    Connection.unMuteUser(playerToBan);
    } catch(Exception e) {
    c.sendMessage("Player Must Be Offline.");
    }
    }

    }
    }
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Sep 2010
    Age
    27
    Posts
    430
    Thanks given
    11
    Thanks received
    19
    Rep Power
    23
    please add the code in between [code] tags WITH conventions. that would help quite a bit
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2010
    Posts
    104
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    what do you mean? =\
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Sep 2010
    Posts
    104
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    If it helps ill edit it, and put some spaces between each command?
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Sep 2010
    Age
    27
    Posts
    430
    Thanks given
    11
    Thanks received
    19
    Rep Power
    23
    heres my teletome command:
    Code:
    			if (playerCommand.startsWith("teletome") && c.playerRights >= 1) {
    				if (c.inWild())
    				return;
    				try {	
    					String playerToBan = playerCommand.substring(9);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.teleportToX = c.absX;
    								c2.teleportToY = c.absY;
    								c2.heightLevel = c.heightLevel;
    								c.sendMessage("You have teleported " + c2.playerName + " to you.");
    								c2.sendMessage("You have been teleported to " + c.playerName + "");
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}
    			}
    see that? the margins before the code starts are called conventions. they allow for easy copy and paste/ editing the current code without having to move much around. just add this into your command if statements or replace your current "teletome" command if you already have one

    to add code, you type [code], paste the code in that you want to be in the box, then use an end tag
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Sep 2010
    Posts
    104
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    Hey dub can u juss add my msn please...i tryed adding it and it keeps showing errors...its
    [Only registered and activated users can see links. ]
    please..can really use your help..
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Sep 2010
    Age
    27
    Posts
    430
    Thanks given
    11
    Thanks received
    19
    Rep Power
    23
    added.
    Reply With Quote  
     

  8. #8  
    Registered Member Ghost`'s Avatar
    Join Date
    May 2010
    Posts
    416
    Thanks given
    10
    Thanks received
    13
    Rep Power
    2
    There are two ::item commands in the original PI source. The one that has
    Code:
    System.out.println("Spawned item
    etc is missing a closing bracket, allowing it to fall through and not letting the commands under it work.

    Remove that command.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Sep 2010
    Posts
    104
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    Ghost, we didn't find anything like that.
    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

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