Author Topic: [PI] Good ::yell command  (Read 1454 times)

Offline Alex_Kilroy

  • Adamant Member
  • *
  • Posts: 91
  • Rep 2
  • Java programmer
  • Location: United Kingdom, England.
    • View Profile
Re: [PI] Good ::yell command
« Reply #15 on: March 14, 2011, 07:02:17 pm »
Go to Commands.java and replace this with your old yell command.
Code: [Select]
if (playerCommand.startsWith("yell")) {
String rank = "";
String Message = playerCommand.substring(4);
if (c.playerRights >= 0 && c.isDonator >= 0) {
rank = "[@mag@Player@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 0 && c.isDonator >= 1) {
rank = "[@gre@Donator@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 1) {
rank = "[@blu@Mod@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 2) {
rank = "[@yel@Admin@bla@]["+ c.playerName +"]:";
}
if (c.playerRights >= 3) {
rank = "[@red@Owner@bla@]["+ Misc.ucFirst(c.playerName) +"]:";
}
if (c.playerName.equalsIgnoreCase("brandon")) {
rank = "[@red@Developer@bla@]["+ 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);
}
}
}

Save, close, compile, done. Any questions ask.

Basics and theres no need to set the string equal to nothing.
I'm a MEXICAN
#facepalm
My various other names are, Byte3, Kaex and Limbo.
I am now known as Alex_Kilroy.