Thread: [PI] Yell Help

Results 1 to 6 of 6
  1. #1 [PI] Yell Help 
    Registered Member x Mariokillu x's Avatar
    Join Date
    Dec 2010
    Age
    29
    Posts
    294
    Thanks given
    10
    Thanks received
    1
    Rep Power
    1
    Base: Project Insanity/317
    Problem: Commands interfere with the yell command
    Errors(Compiling Errors): none
    Other Information/Media(Pictures, etc):

    Atm, I'm working on a project and almost done but I have this one problem





    When I try to do any command, it says it over yell and doesnt even do the command.


    Here is my yell command

    Code:
    		if (playerCommand.startsWith("/") && c.playerRights >= 1 || c.isDonator == 1) {
    		String text = playerCommand.substring(1);
    /* 			if (c.clanId >= 0) {
    				// System.out.println(playerCommand);
    				playerCommand = playerCommand.substring(1);
    				Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId);
    			} else {
    				if (c.clanId != -1)
    					c.clanId = -1;
    				c.sendMessage("You are not in a clan.");
    			}
    			return;  */
    			for (int j = 0; j < Server.playerHandler.players.length; j++) {
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    			c2.sendClan(c.playerName, Character.toUpperCase(text.charAt(0)) + text.substring(1), "PrayScape", c.playerRights);
    			
    			}
    			}
    		}

    Does anyone know how to fix this? If you do, it would be nice to share



    EDIT: I added

    Code:
    playerCommand.length() > 5
    and the commands work now but it still says them over yell.
    Reply With Quote  
     

  2. #2  
    Tinkerbell1234
    Guest
    Code:
    if (playerCommand.startsWith("yell")) {
    			String rank = "";
    			String Message = playerCommand.substring(4);
    			if (c.playerRights == 0) {
    				rank = "[Player] ["+ c.playerName +"] : ";
    			}
    			if (c.playerRights == 1 && c.memberStatus == 1) {
    				rank = "[Mod] ["+ c.playerName +"] : ";
    			}
    			if (c.playerRights == 2 && c.memberStatus == 1) {
    				rank = "[Admin] ["+ c.playerName +"] : ";
    			}
    			if (c.playerRights == 4 && c.memberStatus == 1) {
    				rank = "[Player] ["+ c.playerName +"] : ";
    			}
    			if (c.playerRights == 4) {
    				rank = "[Player] ["+ c.playerName +"] : ";
    			}
    			if (c.playerRights == 1) {
    				rank = "[Mod] ["+ c.playerName +"] : ";
    			}
    			if (c.playerRights == 2) {
    				rank = "[Admin] ["+ c.playerName +"] : ";
    			}
    			if (c.memberStatus == 1) {
    				rank = "[Donator] ["+ c.playerName +"] : ";
    			}    
    			if (c.memberStatus == 1 && c.playerName.equalsIgnoreCase("Owner Eson")) {
    				rank = "[Owner] ["+ c.playerName +"] : ";
    			}    
    			if (c.memberStatus == 1 && c.playerName.equalsIgnoreCase("Owner Eson")) {
    				rank = "[Owner] ["+ 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);
    				}
    here is my yell command try that ?
    Reply With Quote  
     

  3. #3  
    Registered Member x Mariokillu x's Avatar
    Join Date
    Dec 2010
    Age
    29
    Posts
    294
    Thanks given
    10
    Thanks received
    1
    Rep Power
    1
    I want adding ranks as a last resort... I want it so when you yell, it says the server name by your name.
    Reply With Quote  
     

  4. #4  
    Registered Member x Mariokillu x's Avatar
    Join Date
    Dec 2010
    Age
    29
    Posts
    294
    Thanks given
    10
    Thanks received
    1
    Rep Power
    1
    Plus you should really read through the post. My problem is that when I do commands, it says them over yell
    Reply With Quote  
     

  5. #5  
    Registered Member susurik's Avatar
    Join Date
    Jan 2011
    Posts
    253
    Thanks given
    140
    Thanks received
    13
    Rep Power
    2
    Quote Originally Posted by x Mariokillu x View Post
    Base: Project Insanity/317
    Problem: Commands interfere with the yell command
    Errors(Compiling Errors): none
    Other Information/Media(Pictures, etc):

    Atm, I'm working on a project and almost done but I have this one problem





    When I try to do any command, it says it over yell and doesnt even do the command.


    Here is my yell command

    Code:
    		if (playerCommand.startsWith("/") && c.playerRights >= 1 || c.isDonator == 1) {
    		String text = playerCommand.substring(1);
    /* 			if (c.clanId >= 0) {
    				// System.out.println(playerCommand);
    				playerCommand = playerCommand.substring(1);
    				Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId);
    			} else {
    				if (c.clanId != -1)
    					c.clanId = -1;
    				c.sendMessage("You are not in a clan.");
    			}
    			return;  */
    			for (int j = 0; j < Server.playerHandler.players.length; j++) {
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    			c2.sendClan(c.playerName, Character.toUpperCase(text.charAt(0)) + text.substring(1), "PrayScape", c.playerRights);
    			
    			}
    			}
    		}

    Does anyone know how to fix this? If you do, it would be nice to share



    EDIT: I added

    Code:
    playerCommand.length() > 5
    and the commands work now but it still says them over yell.
    The command you posted is not yell commands but clan chat.
    Reply With Quote  
     

  6. #6  
    Registered Member x Mariokillu x's Avatar
    Join Date
    Dec 2010
    Age
    29
    Posts
    294
    Thanks given
    10
    Thanks received
    1
    Rep Power
    1


    Code:
    /* 			if (c.clanId >= 0) {
    				// System.out.println(playerCommand);
    				playerCommand = playerCommand.substring(1);
    				Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId);
    			} else {
    				if (c.clanId != -1)
    					c.clanId = -1;
    				c.sendMessage("You are not in a clan.");
    			}
    			return;  */

    See how its blocked out? Congrats....



    Look at the picture.... Do you see the Clan Chat tab?
    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. Pi yell
    By R4nger 0wnz in forum Help
    Replies: 2
    Last Post: 07-27-2010, 01:10 PM
  2. Yell
    By dowon in forum Help
    Replies: 6
    Last Post: 10-17-2009, 04:17 PM
  3. ::yell [delta] (with yell,ranks etc)
    By Coder Alex in forum Tutorials
    Replies: 9
    Last Post: 09-04-2009, 04:56 AM
  4. yell
    By Eminem™ in forum Help
    Replies: 0
    Last Post: 03-08-2009, 12:18 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
  •