please add the code in between [code] tags WITH conventions. that would help quite a bit
|
|
Hey i need help with a few things that other forums could not help with='(
i cant seem to get vengance to work, and i cant get IPMute to work or Mute,
and i need to know how to add ::kick and ::xteletome can someone please help me!='( ill add my mute and ip mute commands in here...
if (playerCommand.startsWith("mute") && c.playerRights >= 1) {
try {
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("ipmute") && c.playerRights >= 2) {
try {
String playerToBan = 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(playerToBan)) {
Connection.addIpToMuteList(Server.playerHandler.pl ayers[i].connectedFrom);
c.sendMessage("You have IP Muted the user: "+Server.playerHandler.players[i].playerName);
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("unipmute") && c.playerRights >= 2) {
try {
String playerToBan = playerCommand.substring(9);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
Connection.unIPMuteUser(Server.playerHandler.playe rs[i].connectedFrom);
c.sendMessage("You have Un Ip-Muted the user: "+Server.playerHandler.players[i].playerName);
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
if (playerCommand.startsWith("unmute") && c.playerRights >= 1) {
try {
String playerToBan = playerCommand.substring(7);
Connection.unMuteUser(playerToBan);
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
}
}
}
please add the code in between [code] tags WITH conventions. that would help quite a bit
what do you mean? =\
If it helps ill edit it, and put some spaces between each command?
heres my teletome command:
see that? the margins before the code starts are called conventions. they allow for easy copy and paste/ editing the current code without having to move much around. just add this into your command if statements or replace your current "teletome" command if you already have oneCode:if (playerCommand.startsWith("teletome") && c.playerRights >= 1) { if (c.inWild()) return; try { String playerToBan = playerCommand.substring(9); 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.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c.sendMessage("You have teleported " + c2.playerName + " to you."); c2.sendMessage("You have been teleported to " + c.playerName + ""); } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } }
to add code, you type [code], paste the code in that you want to be in the box, then use an end tag
added.
There are two ::item commands in the original PI source. The one that hasetc is missing a closing bracket, allowing it to fall through and not letting the commands under it work.Code:System.out.println("Spawned item
Remove that command.
Ghost, we didn't find anything like that.
| « Need help paying up to 40$ for everything done. | [PI] Dclaws Worn on head? HELP » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |