Need 2 commands written for PI base.(technically 4) First command i need written is a working ::mute and unmute and second i need is a :romote and :emote command)
:romote/demote must promote to permission level: 1
::mute/unmute must only work for permission level: 1
At completion please leave your paypal and i will be sure to send as a gift on paypal or western union if you prefer
*note: I also have 5-6 runescape pins i will give one instead if you would like.
Because its really only 2...just gotta switch the code to do the opposite...if you can code ::mute then it would take almost no work to code ::unmute....
Mute & unmute is already added in PI source.
The reason why mute won't work is because sanity commented a line out in connection.java..
Last line, delete the // and remove the return false;
---
Code:
if (playerCommand.startsWith("mute")) {
try {
if(c.playerRights > 0){
return;
}
String playerToBan = playerCommand.substring(5);
Connection.addNameToMuteList(playerToBan);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
Client c2 = (Client)Server.playerHandler.players[i];
c2.sendMessage("You have been muted by: " + c.playerName);
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
if (playerCommand.startsWith("unmute")) {
try {
if(c.playerRights > 0){
return;
}
String playerToBan = playerCommand.substring(7);
Connection.unMuteUser(playerToBan);
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
?
a promote command to PlayerRights 1.
Code:
if (playerCommand.startsWith("promote")) {
try {
String playerToG = playerCommand.substring(8);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToG)) {
Server.playerHandler.players[i].playerRights = 1;
c.sendMessage("You have given "+Misc.optimizeText(Server.playerHandler.players[i].playerName)+" the position: @[email protected]");
Server.playerHandler.players[i].disconnected = true;
}
}
}
}
catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
if (playerCommand.startsWith("demote") && c.playerName.equalsIgnoreCase("yourname")) {
try {
String playerTodonar = playerCommand.substring(7);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerTodonar)) {
Server.playerHandler.players[i].playerRights = 0;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
I just found these commands on r-s, so not sure if it works [Only registered and activated users can see links. ] (':
[Only registered and activated users can see links. ]