put it under donatorCommands
|
|

Code:if (playerCommand.startsWith("yell")) { if(Connection.isMuted(c)) { c.sendMessage("You are muted and cannot yell"); return; } String rank = "[Player] ["+ c.playerName +"]"; String Message = playerCommand.substring(4); if (c.playerRights == 1) { rank = "[Moderator] ["+ c.playerName +"] : "; } if (c.playerRights == 2) { rank = "[Admin] ["+ c.playerName +"] : "; } if (c.playerRights == 3) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.playerRights == 4) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.memberStatus >= 3) { rank = "[@[email protected]@[email protected]] ["+ 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); } } }
THATS MY YELL COMMAND, MAKE IT SO ONLY STAFF [MOD - OWNER] AND DONATORS [C.memberSTatus ==3 ] CAN USE YELL
put it under donatorCommands

i GOT NO "Donator Commands" its just
c.memberStatus == 3 is donator
Code:if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3) { if(Connection.isMuted(c)) { c.sendMessage("You are muted and cannot yell"); return; } String rank = "[Player] ["+ c.playerName +"]"; String Message = playerCommand.substring(4); if (c.playerRights == 1) { rank = "[Moderator] ["+ c.playerName +"] : "; } if (c.playerRights == 2) { rank = "[Admin] ["+ c.playerName +"] : "; } if (c.playerRights == 3) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.playerRights == 4) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.memberStatus == 3) { rank = "[@[email protected]@[email protected]] ["+ 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); } } }

Can I make it so
if (c.playerName.equalsIgnoreCase("Penis")) {
rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : ";
}
if (c.playerName.equalsIgnoreCase("Tyler")) {
rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : ";
}
if (c.playerName.equalsIgnoreCase("Zara")) {
rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : ";
}
I want tThose people to be able to yell if they are at 0 player rights/
Put it under
& try. It should work. If not thenCode:if (c.memberStatus == 3) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; }
Code:if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3 || c.playerName.equalsIgnoreCase("Zara") || c.playerName.equalsIgnoreCase("Tyler") || c.playerName.equalsIgnoreCase("Penis")) {

Worked but, for normal players I want it to say "This is a Donator ONLY feature.Code:if (playerCommand.startsWith("yell") && c.playerRights > 0 || c.memberStatus == 3 || c.playerName.equalsIgnoreCase("Zara") || c.playerName.equalsIgnoreCase("Tyler") || c.playerName.equalsIgnoreCase("Penis")) { if(Connection.isMuted(c)) { c.sendMessage("You are muted and cannot yell"); return; } String rank = "[Player] ["+ c.playerName +"]"; String Message = playerCommand.substring(4); if (c.playerRights == 1) { rank = "[Moderator] ["+ c.playerName +"] : "; } if (c.playerRights == 2) { rank = "[Admin] ["+ c.playerName +"] : "; } if (c.playerRights == 3) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.playerRights == 4) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.playerName.equalsIgnoreCase("Penis")) { rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : "; } if (c.playerName.equalsIgnoreCase("Tyler")) { rank = "[@[email protected]@[email protected]] ["+ c.playerName +"] : "; } if (c.playerName.equalsIgnoreCase("Zara")) { rank = "[@[email protected] [email protected]@] ["+ c.playerName +"] : "; } if (c.memberStatus >= 3) { rank = "[@[email protected]@[email protected]] ["+ 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); } } }
If anyone has a better way to do all of this, please post it.Code:if (c.memberStatus < 3) { c.sendMessage("This is a Donator ONLY feature."); return; }

Dont remove requirements
Code:if (c.playerRights == 0 && c.memberStatus < 3) { c.sendMessage("This is a Donator ONLY feature."); return; }
| « [PI] Double XP Hour | Clip These Tiles God damnit! » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |