Originally Posted by
Puffy Fawter
Alright so basically I have been using the source Explicity and everything has been going smooth so far but there is one command that doesn't work right which is the ::yell command. . Basically the problem is that its not that the command works itself but anything above players rights 2 does not work. So for example, whenever I set myself to players rights 3 it gives me a message, you must be a donator to use this command. Here is the code.... If anyone could help would be much appreciated.
if (playerCommand.startsWith("yell")) {
/*
*This is the sensor for the yell command
*/
String text = playerCommand.substring(5);
String[] bad = {"<img=1>", "<img=2>", "<img=0>", "Fuck", "Nigger", "Cunt", "Faggot"};
for(int i = 0; i < bad.length; i++){
if(text.indexOf(bad[i]) >= 0){
return;
}
}
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
if (c.playerName.equalsIgnoreCase("")) {
c2.sendMessage("<shad=15369497>[Extreme Donator]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerName.equalsIgnoreCase("Predator")) {
c2.sendMessage("<shad=15695415>[Owner]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.isDonator == 1 && (c.playerRights == 1 )) {
c2.sendMessage("<shad=6081134>[Donator]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerRights == 1) {
c2.sendMessage("<shad=3781373>[Moderator]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerRights == 2) {
c2.sendMessage("<shad=16112652>[Administrator]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerName.equalsIgnoreCase("Mr Terror")) {
c2.sendMessage("<shad=15695415>[Owner]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerName.equalsIgnoreCase("Skillz")) {
c2.sendMessage("<shad=15695415>[Co-Owner]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerName.equalsIgnoreCase("Wet Dreams")) {
c2.sendMessage("<shad=15695415>[Developer]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.playerName.equalsIgnoreCase("")) {
c2.sendMessage("<shad=15695415>[Owner]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
} else if (c.isDonator == 0) {
c.sendMessage("You must be a donator to use this command!");
} else {
if (c.isInJail()) {
c.sendMessage("You cannot yell while you are in Jail!");
return;
}