Thread: [PI] Mute Command

Results 1 to 10 of 10
  1. #1 [PI] Mute Command 
    Registered Member Sky Highz's Avatar
    Join Date
    Jan 2011
    Posts
    32
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Base: Project Insanity [PI]
    Problem: How do I make it so when you mute a player, it makes it so they can't talk in ::yell and clan chat?
    Errors(Compiling Errors): None.
    Other Information/Media(Pictures, etc): No.


    ~~~
    How do I make it so when you mute a player, it makes it so they can't talk in ::yell and clan chat?

    +Rep if you help me and it works.

    Thank you.
    Last edited by Sky Highz; 02-13-2011 at 02:49 AM. Reason: Used format.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Gator God's Avatar
    Join Date
    Aug 2010
    Posts
    260
    Thanks given
    15
    Thanks received
    26
    Rep Power
    99
    Quote Originally Posted by H A W X;
    [IMG]C:\Users\R\Desktop\Rune-Server\Pictures[/IMG]
    :trollface:
    Reply With Quote  
     

  3. #3  
    Registered Member
    TORONTO's Avatar
    Join Date
    Feb 2010
    Age
    30
    Posts
    873
    Thanks given
    348
    Thanks received
    212
    Rep Power
    92
    "InB4 Vasticia the no-life who sits and reads the help section all day comes and locks this"

    Go to you your yell command and put && !isMuted
    retired from RSPS for good

    EDIT:
    I came back one last time just to thank this post:
    [SPOIL]
    [/SPOIL]
    Reply With Quote  
     

  4. #4  
    Registered Member Sky Highz's Avatar
    Join Date
    Jan 2011
    Posts
    32
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by iLankan View Post
    "InB4 Vasticia the no-life who sits and reads the help section all day comes and locks this"

    Go to you your yell command and put && !isMuted
    Where at? Explain further please?

    I'll edit my post too, so he doesn't lock it.
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Feb 2011
    Posts
    130
    Thanks given
    13
    Thanks received
    14
    Rep Power
    0
    if (!isMuted) {
    //Actions
    }

    There
    Reply With Quote  
     

  6. #6  
    Registered Member Sky Highz's Avatar
    Join Date
    Jan 2011
    Posts
    32
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Sorry if I sound a bit stupid but, mind adding it in the right spot for me?

    Code:
    if (playerCommand.startsWith("yell")) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++) {
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    							if (c.playerRights == 0){
    								c.sendMessage("You must be a donator to use this command!");
    							}
    							if (c.playerRights == 1){
    								c2.sendMessage("<col=255>[Mod]</col><img=1>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 2){
    								c2.sendMessage("<col=1602525>[Admin]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 3){
    								c2.sendMessage("<shad=15695415>[Owner]</shad><img=2>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 4){
    								c2.sendMessage("<shad=6081134>[$Donator$]</shad><img=0>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 5){
    								c2.sendMessage("[Coder]"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 6){
    								c2.sendMessage("<col=11000>[Designer]</col>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    					}
    				}
    }
    }
    That's my yell command.
    Reply With Quote  
     

  7. #7  
    Zaros Developer

    Nomac's Avatar
    Join Date
    Feb 2011
    Age
    29
    Posts
    1,068
    Thanks given
    318
    Thanks received
    200
    Rep Power
    1092
    Code:
    if (playerCommand.startsWith("yell") && !isMuted) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++) {
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    							if (c.playerRights == 0){
    								c.sendMessage("You must be a donator to use this command!");
    							}
    							if (c.playerRights == 1){
    								c2.sendMessage("<col=255>[Mod]</col><img=1>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 2){
    								c2.sendMessage("<col=1602525>[Admin]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 3){
    								c2.sendMessage("<shad=15695415>[Owner]</shad><img=2>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 4){
    								c2.sendMessage("<shad=6081134>[$Donator$]</shad><img=0>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 5){
    								c2.sendMessage("[Coder]"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 6){
    								c2.sendMessage("<col=11000>[Designer]</col>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    					}
    				}
    }
    }
    Reply With Quote  
     

  8. #8  
    Registered Member susurik's Avatar
    Join Date
    Jan 2011
    Posts
    253
    Thanks given
    140
    Thanks received
    13
    Rep Power
    2
    Code:
    if (playerCommand.startsWith("yell")) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++) {
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    							if (c.playerRights == 0){
    								c.sendMessage("You must be a donator to use this command!");
    							if(Connection.isMuted(c)){
    							c.sendMessage("You are muted and cannot yell");
    							return;
    							}
    							}
    							if (c.playerRights == 1){
    								c2.sendMessage("<col=255>[Mod]</col><img=1>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 2){
    								c2.sendMessage("<col=1602525>[Admin]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 3){
    								c2.sendMessage("<shad=15695415>[Owner]</shad><img=2>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 4){
    								c2.sendMessage("<shad=6081134>[$Donator$]</shad><img=0>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 5){
    								c2.sendMessage("[Coder]"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    							}else if (c.playerRights == 6){
    								c2.sendMessage("<col=11000>[Designer]</col>"+ Misc.optimizeText(c.playerName) +": "
    												+ Misc.optimizeText(playerCommand.substring(5)) +"");
    					}
    				}
    }
    }
    Reply With Quote  
     

  9. #9  
    Registered Member Sky Highz's Avatar
    Join Date
    Jan 2011
    Posts
    32
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Didn't work. I think it's deeper into the files then just the command..
    Reply With Quote  
     

  10. #10  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    if (!isMuted...
    return;
    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: 4
    Last Post: 12-21-2010, 09:36 PM
  2. Replies: 4
    Last Post: 12-19-2010, 11:46 PM
  3. mute command 614
    By Zᴀᴄʜ in forum Requests
    Replies: 0
    Last Post: 12-13-2010, 11:54 PM
  4. [PI]Mute Command
    By iGoth in forum Help
    Replies: 6
    Last Post: 06-25-2010, 06:31 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •