Thread: No Commands In Wildy(Noob Tut)

Results 1 to 5 of 5
  1. #1 No Commands In Wildy(Noob Tut) 
    Registered Member
    novalye's Avatar
    Join Date
    Sep 2007
    Posts
    784
    Thanks given
    1
    Thanks received
    0
    Rep Power
    393
    Description: To make Commands not be able to be used in Wildy except Admins

    Difficulty: 1-10

    Assumed Knowledge: Copy and Paste, Finding Cases

    Tested Server: RevivalScape

    Files/Classes Modified: Client.Java

    Credits: Me for Adding

    Ok, go into client .java and search for
    Code:
    case 103:
    Replace that case with:
    Code:
            case 103: // Custom player command, the ::words
                String playerCommand = inStream.readString();
    
                println_debug("playerCommand: " + playerCommand);
    		if(!inSafezone() && playerRights >=2) {
                customCommand(playerCommand);
                println_debug("playerAdminCommand: " + playerCommand);
    }
    		if(inSafezone()) {
                customCommand(playerCommand);
    		} else if(!inSafezone() && playerRights <=0) {
    			sendMessage("You can not use commands in this zone");
    		}
                break;
    This will make it so that people can't use any Commands in the Wilderness. Only Admins. I hope you like, it is a very easy thing to do.
    Have fun!
     

  2. #2  
    Banned
    Join Date
    Mar 2008
    Posts
    546
    Thanks given
    1
    Thanks received
    1
    Rep Power
    0
    is it possible to make it for a minigame like so you cant use it in therE?
     

  3. #3  
    Registered Member
    novalye's Avatar
    Join Date
    Sep 2007
    Posts
    784
    Thanks given
    1
    Thanks received
    0
    Rep Power
    393
    Not in this part of client.java
    You could add this to certain Commands, but I don't know how and I don't really want to try and figure it out.
     

  4. #4  
    Ivo
    Ivo is offline
    Coding coding coding...

    Ivo's Avatar
    Join Date
    Mar 2008
    Age
    30
    Posts
    1,426
    Thanks given
    30
    Thanks received
    147
    Rep Power
    2017
    ooh, ill use it...thx rep ++

    [Only registered and activated users can see links. ]
     

  5. #5  
    Registered Member
    novalye's Avatar
    Join Date
    Sep 2007
    Posts
    784
    Thanks given
    1
    Thanks received
    0
    Rep Power
    393
    Quote Originally Posted by justah View Post
    ooh, ill use it...thx rep ++
    No problem!
     


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
  •