Thread: [525]Jail help (1 little thing)

Results 1 to 2 of 2
  1. #1 [525]Jail help (1 little thing) 
    Registered Member
    Join Date
    Aug 2007
    Posts
    31
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Ok so i tele them to a room where nothing else can get them out except for ::home ill post what I did. Can somebody tell me why ::home still works?

    Ok so i made this jail command
    Code:
    package com.rs2hd.packethandler.commands;
    
    import com.rs2hd.model.Player;
    import com.rs2hd.util.log.Logger;
    import com.rs2hd.model.World;
    
    /**
    *
    * jail a player
    * @author I Love Pie
    */
    public class jail implements Command {
    
    
    @Override
    public void execute(Player player, String command) {
    String cmd[] = command.split(" ");
    String name = cmd[1];
    if (name == null) {
    Logger.getInstance().info("Invalid name specified");
    return;
    }
    for(Player p : World.getInstance().getPlayerList()) {
    if(p.getUsername().equalsIgnoreCase(name)) {
    p.teleportTo(3236, 3485, 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
    player.sm("You have just jailed " +p.getUsername());
    p.getActionSender().sendMessage("You have just been jailed.");
    p.jail = 1;
    break;
    }
    }
    }
    This is my home command

    Code:
    package com.rs2hd.packethandler.commands;
    
    import com.rs2hd.model.Location;
    import com.rs2hd.model.Player;
    
    /**
     * 
     * Teleport command.
     * @author Dragonkk/Revol525
     */
    public class Home implements Command {
    
    	@Override
    	public void execute(Player player, String command) {
    		try {
    if (!player.SafeZone() && player.bountyArea() && player.bh == true && player.jail == 1) {
    return;
    }
    		String cmd[] = command.split(" ");
    		//player.tele(3273, 3687, 0);//old home coords 2441 3090
    		player.getActionSender().setOptions();
    		player.teleportTo(3273, 3687, 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
    		player.getActionSender().sendTab(10, 18); // wild lvl tab off
    		} catch (Exception e) {
    			player.getActionSender().sendMessage("Invaild Characters, try again.");
    		}
    	}
    
    	@Override
    	public int getRights() {
    		return 0;
    	}
    
    }
    And I added this to player java
    Code:
    	public int jail = 0;
    Reply With Quote  
     

  2. #2  
    Sexy Donator
    Downfall's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,084
    Thanks given
    10
    Thanks received
    1
    Rep Power
    393
    Code:
    package com.rs2hd.packethandler.commands;
    
    import com.rs2hd.model.Location;
    import com.rs2hd.model.Player;
    
    /**
     * 
     * Teleport command.
     * @author Dragonkk/Revol525
     */
    public class Home implements Command {
    
        @Override
        public void execute(Player player, String command) {
            try {
    if (!player.SafeZone() && player.bountyArea() && player.bh == true && player.jail() == 1) {
    return;
    }
            String cmd[] = command.split(" ");
            //player.tele(3273, 3687, 0);//old home coords 2441 3090
            player.getActionSender().setOptions();
            player.teleportTo(3273, 3687, 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
            player.getActionSender().sendTab(10, 18); // wild lvl tab off
            } catch (Exception e) {
                player.getActionSender().sendMessage("Invaild Characters, try again.");
            }
        }
    
        @Override
        public int getRights() {
            return 0;
        }
    I donno if thats the problem but uhh try that

    [Only registered and activated users can see links. ]
    Did you know?
    - JaGeX has enough money to buy 8,000,000 tons of SuperCrack.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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