Thread: Pi yell

Results 1 to 10 of 10
  1. #1 Pi yell 
    Banned

    Join Date
    Sep 2009
    Posts
    904
    Thanks given
    139
    Thanks received
    55
    Rep Power
    0
    Code:
                            		if (playerCommand.startsWith("yell")) {
    if(Connection.isMuted(c)) {
           c.sendMessage("You are muted and cannot yell");
    return;
    }
                            			String rank = "[Player] ["+ c.playerName +"]";
                            		String Message = playerCommand.substring(4);
    
                          		 if (c.playerRights == 1) {
                            			                 rank = "[Moderator] ["+ c.playerName +"] : ";
                          		}
                           		 if (c.playerRights == 2) {
                                    			rank = "[Admin] ["+ c.playerName +"] : ";
                           		}
                          		 if (c.playerRights == 3) {
                                   		 rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                        	    	}
                            		if (c.playerRights == 4) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            		if (c.memberStatus >= 3) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            for (int j = 0; j < Server.playerHandler.players.length; j++) {
                                    if (Server.playerHandler.players[j] != null) {
                                            Client c2 = (Client)Server.playerHandler.players[j];
                                            c2.sendMessage(rank+Message);
                                    }
                            }
                    }

    THATS MY YELL COMMAND, MAKE IT SO ONLY STAFF [MOD - OWNER] AND DONATORS [C.memberSTatus ==3 ] CAN USE YELL
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2009
    Posts
    422
    Thanks given
    3
    Thanks received
    20
    Rep Power
    7
    put it under donatorCommands
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Sep 2009
    Posts
    904
    Thanks given
    139
    Thanks received
    55
    Rep Power
    0
    i GOT NO "Donator Commands" its just

    c.memberStatus == 3 is donator
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2009
    Posts
    422
    Thanks given
    3
    Thanks received
    20
    Rep Power
    7
    Code:
    if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3) {
    if(Connection.isMuted(c)) {
           c.sendMessage("You are muted and cannot yell");
    return;
    }
                            			String rank = "[Player] ["+ c.playerName +"]";
                            		String Message = playerCommand.substring(4);
    
                          		 if (c.playerRights == 1) {
                            			        rank = "[Moderator] ["+ c.playerName +"] : ";
                          		}
                           		 if (c.playerRights == 2) {
                                    			rank = "[Admin] ["+ c.playerName +"] : ";
                           		}
                          		 if (c.playerRights == 3) {
                                   		 rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                        	    	}
                            		if (c.playerRights == 4) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            		if (c.memberStatus == 3) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            for (int j = 0; j < Server.playerHandler.players.length; j++) {
                                    if (Server.playerHandler.players[j] != null) {
                                            Client c2 = (Client)Server.playerHandler.players[j];
                                            c2.sendMessage(rank+Message);
                                    }
                            }
                    }
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Sep 2009
    Posts
    904
    Thanks given
    139
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by ipkerzi View Post
    Code:
    if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3) {
    if(Connection.isMuted(c)) {
           c.sendMessage("You are muted and cannot yell");
    return;
    }
                            			String rank = "[Player] ["+ c.playerName +"]";
                            		String Message = playerCommand.substring(4);
    
                          		 if (c.playerRights == 1) {
                            			        rank = "[Moderator] ["+ c.playerName +"] : ";
                          		}
                           		 if (c.playerRights == 2) {
                                    			rank = "[Admin] ["+ c.playerName +"] : ";
                           		}
                          		 if (c.playerRights == 3) {
                                   		 rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                        	    	}
                            		if (c.playerRights == 4) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            		if (c.memberStatus == 3) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            for (int j = 0; j < Server.playerHandler.players.length; j++) {
                                    if (Server.playerHandler.players[j] != null) {
                                            Client c2 = (Client)Server.playerHandler.players[j];
                                            c2.sendMessage(rank+Message);
                                    }
                            }
                    }

    Can I make it so


    if (c.playerName.equalsIgnoreCase("Penis")) {
    rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : ";
    }
    if (c.playerName.equalsIgnoreCase("Tyler")) {
    rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
    }
    if (c.playerName.equalsIgnoreCase("Zara")) {
    rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : ";
    }

    I want tThose people to be able to yell if they are at 0 player rights/
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2009
    Posts
    422
    Thanks given
    3
    Thanks received
    20
    Rep Power
    7
    Put it under
    Code:
    		if (c.memberStatus == 3) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
    & try. It should work. If not then
    Code:
    if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3 || c.playerName.equalsIgnoreCase("Zara") || c.playerName.equalsIgnoreCase("Tyler") || c.playerName.equalsIgnoreCase("Penis")) {
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Sep 2009
    Posts
    904
    Thanks given
    139
    Thanks received
    55
    Rep Power
    0
    Code:
    if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3 || c.playerName.equalsIgnoreCase("Zara") || c.playerName.equalsIgnoreCase("Tyler") || c.playerName.equalsIgnoreCase("Penis")) {
    if(Connection.isMuted(c)) {
           c.sendMessage("You are muted and cannot yell");
    return;
    }
                            			String rank = "[Player] ["+ c.playerName +"]";
                            		String Message = playerCommand.substring(4);
    
    
                          		 if (c.playerRights == 1) {
                            			                 rank = "[Moderator] ["+ c.playerName +"] : ";
                          		}
                           		 if (c.playerRights == 2) {
                                    			rank = "[Admin] ["+ c.playerName +"] : ";
                           		}
                          		 if (c.playerRights == 3) {
                                   		 rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                        	    	}
                            		if (c.playerRights == 4) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            		if (c.playerName.equalsIgnoreCase("Penis")) {
                                    			rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : ";
                            		}
                            		if (c.playerName.equalsIgnoreCase("Tyler")) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            		if (c.playerName.equalsIgnoreCase("Zara")) {
                                    			rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : ";
                            		}
                            		if (c.memberStatus >= 3) {
                                    			rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
                            		}
                            for (int j = 0; j < Server.playerHandler.players.length; j++) {
                                    if (Server.playerHandler.players[j] != null) {
                                            Client c2 = (Client)Server.playerHandler.players[j];
                                            c2.sendMessage(rank+Message);
                                    }
                            }
                    }
    Worked but, for normal players I want it to say "This is a Donator ONLY feature.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Nov 2009
    Posts
    422
    Thanks given
    3
    Thanks received
    20
    Rep Power
    7
    Code:
    if (c.memberStatus < 3) {
        c.sendMessage("This is a Donator ONLY feature.");
        return;
    }
    If anyone has a better way to do all of this, please post it.
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Sep 2009
    Posts
    904
    Thanks given
    139
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by ipkerzi View Post
    Code:
    if (c.playerRights == 0) {
        c.sendMessage("This is a Donator ONLY feature.");
        return;
    }
    You can also remove all the requirements for using the yell command.


    If anyone has a better way to do all of this, please post it.

    When I do that, it doesn't let 'Zara' 'Tyler' or 'Penis' YELL. it says the message.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Nov 2009
    Posts
    422
    Thanks given
    3
    Thanks received
    20
    Rep Power
    7
    Dont remove requirements

    Code:
    if (c.playerRights == 0 && c.memberStatus < 3) {
        c.sendMessage("This is a Donator ONLY feature.");
        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: 50
    Last Post: 10-07-2015, 04:22 AM
  2. [PI] Customizable Yell Tags > Better Yell System
    By I try too hard in forum Help
    Replies: 6
    Last Post: 08-04-2011, 03:59 PM
  3. PI Yell.
    By Someone in forum Snippets
    Replies: 4
    Last Post: 05-03-2011, 12:01 AM
  4. ::yell [delta] (with yell,ranks etc)
    By Coder Alex in forum Tutorials
    Replies: 9
    Last Post: 09-04-2009, 04:56 AM
  5. very easy yell timer can yell once in 5 secs
    By lord jahva in forum Tutorials
    Replies: 13
    Last Post: 07-06-2008, 10:57 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
  •