Thread: "yell" command not work.

Results 1 to 7 of 7
  1. #1 "yell" command not work. 
    Banned
    Join Date
    May 2010
    Posts
    188
    Thanks given
    16
    Thanks received
    7
    Rep Power
    0
    Hi,


    This is the command where i need sum help.



    THEN I EDITED IT FOR BETTER AND NOW I DON*T GET ERRORS IT*S JUST NOT WORK WHEN I TYPE ::YELL IN-GAME

    THIS WONT WORK

    if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
    String text = command.substring(8);

    if (!muted) {

    if (playerRights == 1) {

    yell("[Mod] " + playerName + " - " + command.substring(5));

    } else if (playerRights == 2) {

    yell("[Admin] " + playerName + " - " + command.substring(5));

    } if (playerName.equalsIgnoreCase("USER HERE")) {

    yell("[Co-Owner] USER HERE - " + command.substring(5));

    } if (playerName.equalsIgnoreCase("USER HERE")) {

    yell("Owner USER HERE - " + command.substring(5));

    }



    } else {

    sM("You are muted therefore you cannot yell.");

    }

    IF you can help me get that work i will rep u
    Reply With Quote  
     

  2. #2  
    PokeNation! Xaves's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    3,476
    Thanks given
    356
    Thanks received
    788
    Rep Power
    646
    Code:
    if (command.equalsIgnoreCase("message")) {
    sM("There are currently " + PlayerHandler.getPlayerCount() + " players!");
    since when this is a yell command?
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    May 2010
    Posts
    188
    Thanks given
    16
    Thanks received
    7
    Rep Power
    0
    Quote Originally Posted by Xaves View Post
    Code:
    if (command.equalsIgnoreCase("message")) {
    sM("There are currently " + PlayerHandler.getPlayerCount() + " players!");
    since when this is a yell command?
    It works same as yell but it's "message" so i want change it "yell" but i don't know why "yell" not work. Do you ?
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,727
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    Maybe you already have a command called yell
    Reply With Quote  
     

  5. #5  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,102
    Thanks given
    1,816
    Thanks received
    1,767
    Rep Power
    2376
    the command you put is ::message to show how many players are online...

    Let me give you my yell.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    May 2010
    Posts
    188
    Thanks given
    16
    Thanks received
    7
    Rep Power
    0
    Quote Originally Posted by Phat 4 u View Post
    Maybe you already have a command called yell
    No, i don't but do u want check my source with team wiewer ?
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,727
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    Quote Originally Posted by ruupe View Post
    No, i don't but do u want check my source with team wiewer ?
    Na, just use this its a simple one

    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];
    						c2.sendMessage("[" + c.playerName + "]: " + playerCommand.substring(7));
    					}
    				}
    			}
    EDIT: just realized your using delta so that wont work... sorry
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •