Thread: Console Commands

Results 1 to 8 of 8
  1. #1 Console Commands 
    ZeroFreeze
    Guest
    Purpose: ^ Title

    Difficulty:

    Assumed Knowledge: Knowing what a console is and fundamentals

    Client Base: N/A

    Classes Modified: client

    Procedure
    Step 1: Create a new class and paste this in it:
    Code:
    import java.util.*;
    import java.io.*;
    import java.net.*;
    
    
    /** @(#) ConsoleCmd.java
     * @author ZeroFreeze
     * www.moparscape.org/smf
     */
    
    public class ConsoleCmd {
    	
    	private String author = "ZeroFreeze"; // Author - Do NOT edit
    	private String c = "Console Command v" + getVersion() + "by " + author; // Startup message
    	private String e = "Error!"; // Error message
    	
    	private List allCmds = new ArrayList(); // ArrayList containing all commands
    	private String exitCmd = "!stop"; // Exit/Stop command
    	
    	/**
    	 * Gets the version of the ConsoleCmd class
    	 * @return 
    	 */
    	
    	private int getVersion() {
    		String line = "";	
    		boolean EndOfFile = false;
    		BufferedReader file = null;
            try {
    			URL url = new URL("http://zeroxsoft.com/consoleversion.txt");
    			file = new BufferedReader(new BufferedReader(new InputStreamReader(url.openStream())));
                line = file.readLine();
            } catch(IOException ioe){
                print(ioe.printStackTrace());
    			return 0;
            } catch(Exception e0){
    			print(e0.printStackTrace());
    			return 0;
    		}
    		while (!EndOfFile && line != null){
    			line = line.trim();
    			try {
    				return Integer.parseInt(line);
    			} catch(IOException ioexception1){
    				EndOfFile = true;
    			}
    		}
    		try {
    			file.close();
    		} catch(IOException ioexception){
    			return 0;
    		}
    		return 0;
    	
    	}
    	
    	/**
    	 * Processes the command
    	 * @param cmd The command to proccess
    	 */
    	
    	private void processCmd(String cmd) {
    		if (cmd.equalsIgnoreCase("noclip")) client.noClip();
    		else return;
    	}
    	
    	/**
    	 * Prints text in console 
    	 */
    	
    	private void print(String txt) {
    		System.out.println(txt);
    	}
    	
    	public ConsoleCmd() {
    		allCmds.add("noclip");
    		Scanner s = new Scanner(System.in);
    		print((author.toLowerCase()).startsWith("zero") ? c : e);
    		for (int i = 0; i < allCmds.size(); i++) {
    			print("Current commands available:");
    			print(allCmds.get(i));
    		}
    		print("Enter a command: ");
    		
    		while(!(s.nextLine()).equalsIgnoreCase(exitCmd)) {
    			processCmd(s.nextLine());
    		}
    	}
    }
    Step 2: Declare this in the client class:
    Code:
    	public static void noClip() {
    		for(int k1 = 0; k1 < 4; k1++) {
    			for(int i2 = 1; i2 < 103; i2++) {
    				for(int k2 = 1; k2 < 103; k2++) 
    					aClass11Array1230[k1].anIntArrayArray294[i2][k2] = 0;
    			}
    		}
    	}
    Step 3: Declare this in the main method of class client:
    Code:
    ConsoleCmd ccmd = new ConsoleCmd();
    Credits: ZeroFreeze (Me)
    A special thanks to Javac for posting that he did something like this, which got me to make this cause I'm bored at the moment =p
    Oh & not tested.. I was doing maths while I was coding this (I was bored), so don't complain if there's a bug or something - Try to fix it yourself
     

  2. #2  
    Epic GFX Guy


    Join Date
    Jul 2006
    Posts
    254
    Thanks given
    0
    Thanks received
    49
    Rep Power
    242
    VERY NICE!

    I was trying to make one of these, but failing, you beat me to it, and now I shall leech you!
    Mwahahahahaha!

    17 Extra Rep++ for you!
     

  3. #3  
    ZeroFreeze
    Guest
    Thanks, morsolo.
     

  4. #4  
    Registered Member
    Join Date
    Jul 2006
    Posts
    178
    Thanks given
    2
    Thanks received
    2
    Rep Power
    58
    Nice ZeroFreeze..
    ~ Known as stmserv on Mopar ~
    ~ Maker of Sly's Cheat Client ~
     

  5. #5  
    ZeroFreeze
    Guest
    Thank you
     

  6. #6  
    Community Veteran

    Crazay's Avatar
    Join Date
    Oct 2006
    Age
    31
    Posts
    1,525
    Thanks given
    40
    Thanks received
    47
    Rep Power
    933
    nice i couldnt do this lol




     

  7. #7  
    ZeroFreeze
    Guest
    Thanks . =p
     

  8. #8  
    bee hind u
    Guest
    commands client side lol cool
     


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. Replies: 18
    Last Post: 03-08-2011, 05:09 AM
  2. [621] Custom Developer Console Commands
    By Anthony-| in forum Snippets
    Replies: 4
    Last Post: 12-18-2010, 04:07 AM
  3. Commands for console.
    By 666is1337 in forum Snippets
    Replies: 3
    Last Post: 10-05-2010, 11:55 AM
  4. Replies: 19
    Last Post: 11-23-2008, 05:30 AM
  5. Console Commands [OLD]
    By PeeHPee in forum Tutorials
    Replies: 4
    Last Post: 12-15-2007, 01:05 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
  •