Thread: [PI] Commands

Results 1 to 4 of 4
  1. #1 [PI] Commands 
    Registered Member
    Join Date
    Feb 2011
    Posts
    55
    Thanks given
    1
    Thanks received
    0
    Rep Power
    26
    Base: Project Insanity
    Problem: Players can ::checkbank other players bank's
    Errors(Compiling Errors):
    Other Information/Media(Pictures, etc): I don't know where to put my code. My code is:

    Code:
    			if (playerCommand.startsWith("checkbank")) {
    				try {
    					String[] args = playerCommand.split(" ", 2);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						Client o = (Client) Server.playerHandler.players[i];
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
                     						c.getPA().otherBank(c, o);
    											break;
    							}
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline."); 
    					}
    			}
    And my commands.java contains:

    PasteBin

    I took it out, and where exactly should I place it?

    Thanks,
    Dynasty
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2009
    Posts
    844
    Thanks given
    44
    Thanks received
    39
    Rep Power
    29
    How hard is it to Copy & paste...?

    Post it under playerRights 1, 2 or 3, you choose.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2011
    Posts
    55
    Thanks given
    1
    Thanks received
    0
    Rep Power
    26
    Quote Originally Posted by i0wn3v3ry View Post
    How hard is it to Copy & paste...?

    Post it under playerRights 1, 2 or 3, you choose.

    Fixed. Please close thread.
    Reply With Quote  
     

  4. #4  
    Registered Member Beanerrr's Avatar
    Join Date
    Feb 2011
    Posts
    598
    Thanks given
    78
    Thanks received
    28
    Rep Power
    6
    Quote Originally Posted by DynastyRSPS View Post
    So say mute was moderator, I would put it by mute?
    Yea, after the last }.
    Though I've seen that you may need to declare a couple of things before pasting the command in.

    Add the code like this:
    Code:
    			if (playerCommand.startsWith("checkbank") && c.playerRights >= 3) {
    				try {
    					String[] args = playerCommand.split(" ", 2);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						Client o = (Client) Server.playerHandler.players[i];
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
                     						c.getPA().otherBank(c, o);
    											break;
    							}
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline."); 
    					}
    			}
    Quote Originally Posted by Galkon View Post
    The rules clearly state, if you can't help, don't reply.


    Quote Originally Posted by Mod Josh - Question: How do you ask girls out?
    I can't ask them out, I am banned from the kitchen
    Quote Originally Posted by Penor View Post
    How will i know if its PI based?? Omfg this is sooo confusing!!
    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. Replies: 9
    Last Post: 11-28-2009, 05:39 AM
  2. Sell Commands / Buy Commands
    By 5simple5 in forum Help
    Replies: 5
    Last Post: 01-17-2009, 06:03 PM
  3. Replies: 19
    Last Post: 11-23-2008, 05:30 AM
Tags for this Thread

View Tag Cloud

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