Thread: Mute

Results 1 to 7 of 7
  1. #1 Mute 
    Registered Member
    Join Date
    Jun 2013
    Posts
    189
    Thanks given
    1
    Thanks received
    4
    Rep Power
    11
    As of now my mute is ipmuting. My mute command is
    }
    if (playerCommand.startsWith("mute") && c.playerRights >= 1) {
    try {
    String playerToBan = playerCommand.substring(5);
    for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    if (Server.playerHandler.players[i] != null) {
    if (Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    Connection.addIpToMuteList(Server.playerHandler.pl ayers[i].connectedFrom);
    c.sendMessage("You have Muted the user: " + Server.playerHandler.players[i].playerName);
    Client c2 = (Client) Server.playerHandler.players[i];
    c2.sendMessage("You have been muted by: " + c.playerName);
    break;
    }
    }
    }
    } catch (Exception e) {
    c.sendMessage("Player is not online.");
    }
    }
    if (playerCommand.startsWith("ban") && playerCommand.charAt(3) == ' ') {
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2013
    Posts
    162
    Thanks given
    4
    Thanks received
    4
    Rep Power
    44
    Ok. But if you don't have a problem a question or an error, please do not post in the "Help" Section

    Message me for help with hosting server
    Reply With Quote  
     

  3. #3  
    Myre


    Join Date
    Apr 2012
    Age
    26
    Posts
    1,519
    Thanks given
    407
    Thanks received
    367
    Rep Power
    475
    Quote Originally Posted by TaxiDave View Post
    Ok. But if you don't have a problem a question or an error, please do not post in the "Help" Section
    Maybe if you told him the correct mute command instead of being an ass and telling him there is no problem.

    Code:
    if (playerCommand.startsWith("mute") && c.playerRights >= 1) {
    				try {	
    					String playerToBan = playerCommand.substring(5);
    					Connection.addNameToMuteList(playerToBan);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.sendMessage("You have been muted by: " + c.playerName);
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2013
    Posts
    162
    Thanks given
    4
    Thanks received
    4
    Rep Power
    44
    Quote Originally Posted by iRize View Post
    Maybe if you told him the correct mute command instead of being an ass and telling him there is no problem.

    Code:
    if (playerCommand.startsWith("mute") && c.playerRights >= 1) {
    				try {	
    					String playerToBan = playerCommand.substring(5);
    					Connection.addNameToMuteList(playerToBan);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.sendMessage("You have been muted by: " + c.playerName);
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    His post didn't even include a question or a request. Have you even read the requirements for a post in the help section you would not be calling me an ass.


    EDIT: And if he has Donator set to playerRights = 4 this code is pretty bad. Giving the donators the ability to use mute.

    Message me for help with hosting server
    Reply With Quote  
     

  5. #5  
    Myre


    Join Date
    Apr 2012
    Age
    26
    Posts
    1,519
    Thanks given
    407
    Thanks received
    367
    Rep Power
    475
    Quote Originally Posted by TaxiDave View Post
    His post didn't even include a question or a request. Have you even read the requirements for a post in the help section you would not be calling me an ass.
    Have you heard of a thing called assumption? Yeah, you can assume he needs to to work properly instead of ipmuting. I called you an ass because you couldn't even tell him how he could fix it. If there's a requirement then go post on all of the ones that say bare minimum.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2013
    Posts
    162
    Thanks given
    4
    Thanks received
    4
    Rep Power
    44
    Quote Originally Posted by iRize View Post
    Have you heard of a thing called assumption? Yeah, you can assume he needs to to work properly instead of ipmuting. I called you an ass because you couldn't even tell him how he could fix it. If there's a requirement then go post on all of the ones that say bare minimum.
    Man I'm not trying to start a war, I'm just saying if you follow some easy steps you could get better help. And maybe he wanted something special on his mute command? Specific players can mute or something how would i know? If he don't know how to find a simple mute command I'm guessing he do not know how to add all these things himself. (No offense i was this bad not too long ago too)

    Message me for help with hosting server
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jun 2013
    Posts
    189
    Thanks given
    1
    Thanks received
    4
    Rep Power
    11
    iRize, Thanks for the help appreciate it.
    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. [TUT]How to add a mute timer[TUT] - Explained
    By Nightleaf in forum Tutorials
    Replies: 10
    Last Post: 07-06-2008, 09:55 AM
  2. Simple Mute Command
    By AMG A Bear in forum Configuration
    Replies: 3
    Last Post: 07-01-2008, 06:10 AM
  3. How to stop massing and muted players yelling!
    By Trytohaxme in forum Tutorials
    Replies: 4
    Last Post: 06-12-2008, 11:13 AM
  4. Mute people when saying bad words!
    By × Zenzie × in forum Tutorials
    Replies: 17
    Last Post: 10-19-2007, 03:58 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
  •