Thread: Simple Command Help.

Results 1 to 4 of 4
  1. #1 Simple Command Help. 
    Donator


    Join Date
    Sep 2008
    Age
    30
    Posts
    397
    Thanks given
    138
    Thanks received
    27
    Rep Power
    161
    I've been helped Requesting lock.




    ---


    Lawl! ^ ^
     

  2. #2  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    Code:
    	if (command.startsWith("mute") && playerRights > 0) {
    		try {
    			String otherPName = command.substring(5);
    			int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    			if (otherPName.equalsIgnoreCase("ragez fury")) {
    				return;
    			}
    			if (otherPIndex != -1) {
    				client p = (client) server.playerHandler.players[otherPIndex];
    				p.muted = true;
    				yell(" "+playerName+" has muted "+p.playerName+" ");
    				writeLog(p.playerName, "mutes");
    				sM("You have muted "+p.playerName+"!");
    			} else { 
    				sM("The name doesnt exist."); 
    			}
    		} catch (Exception e) { 
    			sM("Try entering a name you want to mute..");
    		}
    	}



     

  3. #3  
    discarded
    Guest
    if (username.toLowerCase().equals("yournameonserver") )
    return
     

  4. #4  
    Donator


    Join Date
    Sep 2008
    Age
    30
    Posts
    397
    Thanks given
    138
    Thanks received
    27
    Rep Power
    161
    Changed your code around a bit, Aeterna, but still worked

    Thanks for your help




    ---


    Lawl! ^ ^
     


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
  •