Thread: dementhium help yell

Results 1 to 5 of 5
  1. #1 dementhium help yell 
    Owner of SkyfallRS 718/735
    L3git's Avatar
    Join Date
    Nov 2011
    Posts
    412
    Thanks
    5
    Thanked 9 Times in 8 Posts
    Rep Power
    13
    i made my yell with like category so when owner yells it sayslike matt owner : blah blah

    but for some reason wehen people yel on my chat it saays owner.coder for all and on my admin chat it sasys that they are all admin.

    here is my code..

    Code:
    		if (command[0].equals("yell")) {
    			String yell = getCompleteString(command, 1);
    			for (Player pl : World.getWorld().getPlayers()) {
    			//for(Player p5 : World.getWorld().getPlayers()) {
    				if(pl == null)
    					continue;
    				//number++;
    				pl.sendMessage("["
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "]: <col=ff00ff>" + yell);
    				if (pl.getUsername().equalsIgnoreCase("matt")) {
    					pl.sendMessage("<col=FF0000>[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][Owner/Coder]</col>: <col=ff00ff>" + yell);
    				} else if (pl.getUsername().equalsIgnoreCase("andrew")) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][Co-Owner]: <col=ff00ff>" + yell);
    				} else if (pl.getUsername().equalsIgnoreCase("Derek")) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][2Owner]: <col=ff00ff>" + yell);
    				} else if (pl.getUsername().equalsIgnoreCase("austin")) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][Head-Admin]: <col=ff00ff>" + yell);
    				} else if (pl.getDonor() == 1) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][<col=FF0000>$</col>]: <col=ff00ff>" + yell);
    				} else if (pl.getRights() == 2) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][Admin]: <col=ff00ff>" + yell);
    				} else if (pl.getRights() == 1) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "][Mod]: <col=ff00ff>" + yell);
    				}
    			}
    		}
    Reply With Quote  
     

  2. #2  
    Gfx/Coder

    Apollyn's Avatar
    Join Date
    Dec 2008
    Age
    17
    Posts
    1,961
    Thanks
    34
    Thanked 47 Times in 39 Posts
    Rep Power
    320
    Where is your yell command? If its in player commands thats why



    Reply With Quote  
     

  3. #3  
    Owner of SkyfallRS 718/735
    L3git's Avatar
    Join Date
    Nov 2011
    Posts
    412
    Thanks
    5
    Thanked 9 Times in 8 Posts
    Rep Power
    13
    no cause i made a command yell for all player but if a admin use it says like admin name and [admin] : test

    bu my command dosent work like that
    Reply With Quote  
     

  4. #4  
    Gfx/Coder

    Apollyn's Avatar
    Join Date
    Dec 2008
    Age
    17
    Posts
    1,961
    Thanks
    34
    Thanked 47 Times in 39 Posts
    Rep Power
    320
    Code:
    } else if (pl.getRights() == 0) {
    					pl.sendMessage("[<img="
    						+ (player.getRights() == 0 ? 2 : player.getRights() - 1)
    						+ ">"
    						+ Misc.formatPlayerNameForDisplay(player.getUsername())
    						+ "]: <col=ff00ff>" + yell);
    				}
    Try tht should work..



    Reply With Quote  
     

  5. #5  
    † Skyotic 639 †
    64Bit's Avatar
    Join Date
    Dec 2011
    Age
    23
    Posts
    622
    Thanks
    94
    Thanked 37 Times in 30 Posts
    Rep Power
    4
    Code:
    		if (command[0].equals("yell")) {
    			String yell = getCompleteString(command,1);
    			for (Player pl : World.getWorld().getPlayers()) {
    			if (player.getRights() == 1) {
    					pl.sendMessage("<col=3B9C9C>[Mod]<img=0> "
    							+ Misc.formatPlayerNameForDisplay(player.getUsername())
    							+ ": " + yell);
    				/*} else if(player.getRights() == 0 && player.getDonor() == 0) {
    					pl.sendMessage("[Player] "
    							+ Misc.formatPlayerNameForDisplay(player.getUsername())
    							+ ": " + yell);
    				} else if(player.getDonor() >= 1) {
    					pl.sendMessage("<col=151B8D>[Donator]<img=3>"
    							+ Misc.formatPlayerNameForDisplay(player.getUsername())
    							+ ": " + yell);
    				}*/
     
    			}
    		if(player.getRights() != 1) {
    		player.sendMessage("This command is now removed, please use Charlie's CC! (Entered upon Login)");
    		}
    	}
    		}
    modify ur work into that.
    IGNORANCE WILL BE IGNORED


    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 49
    Last Post: 01-07-2012, 04:24 AM
  2. Replies: 11
    Last Post: 12-23-2011, 01:10 AM
  3. Dementhium Yell Command Tweak
    By imtiax in forum Help
    Replies: 0
    Last Post: 11-23-2011, 10:24 PM
  4. Dementhium Yell Command
    By slicer` in forum Help
    Replies: 0
    Last Post: 11-23-2011, 04:05 PM
  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
  •