Post the command you're trying to add.
|
I was trying to add a :layers command which worked but then after it worked i got this error!
Does anyone have any idea why this error is here and how to get rid of it!?
Post the command you're trying to add.
I took it out. its not the command anymore but here.
This is the area i was messing around with to add the :: players command
if (playerCommand.startsWith("trade") && c.teleBlockLength == 0) {
c.getPA().startTeleport(2605, 3097, 0, "modern");
c.sendMessage("You teleport to the trade area.");
}
if (playerCommand.equalsIgnoreCase("request")) {
if (System.currentTimeMillis() - c.lastHelp < 300000) {
c.sendMessage("You can only do this every 3 mins!.");
}
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
if(Connection.isMuted(c)){
c.sendMessage("You can't ask for help when you are muted.");
return;
}
if (c.Jail == true) {
c.sendMessage("You can't ask for help in jail.");
return;
}
if (PlayerHandler.
[j].playerRights > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 300000) {
c2.sendMessage("[HELP MESSAGE] <shad=15536940>"+Misc.optimizeText(c.playerName)+" </shad> Has requested help.");
c.lastHelp = System.currentTimeMillis();
}
}
}
}
if (playerCommand.equalsIgnoreCase("players")) {
c.sendMessage("There are currently "+PlayerHandler.getPlayerCount()+ " players online.");
c.getPA().sendFrame126("Online Players", 8144);
c.getPA().sendFrame126("@dbl@Online players(" + PlayerHandler.getPlayerCount()+ "):", 8145);
int line = 8147;
for (int i = 1; i < Config.MAX_PLAYERS; i++) {
Client p = c.getClient(i);
if (!c.validClient(i))
continue;
if (p.playerName != null) {
String title = "";
if (p.playerRights == 1) {
title = "Mod, ";
} else if (p.playerRights == 2) {
title = "Admin, ";
}
title += "level-" + p.combatLevel;
String extra = "";
if (c.playerRights > 0) {
extra = "(" + p.playerId + ") ";
}
c.getPA().sendFrame126("@dre@" + extra + p.playerName + "@dbl@ ("+ title + ") @dre@Kills: @dbl@ " + p.KC + ", @dre@Deaths: @dbl@"+ p.DC, line);
line++;
}
}
c.getPA().showInterface(8134);
c.flushOutStream();
}
if(playerCommand.startsWith("return")) {
c.isNpc = false;
c.updateRequired = true;
c.appearanceUpdateRequired = true;
}
if (playerCommand.startsWith("commands")){
c.sendMessage("<shad=60811334> <img=1> Deadly-Pkerz Commands Available <img=1>");
c.sendMessage(" :kp Shows you the amount of PKP you have!");
c.sendMessage(" ::changepassword *newpasswordhere* changes your password!");
c.sendMessage(" ::boss tell's you the bosses and the drop rate!");
c.sendMessage(" ::forums give you the link to the forums!");
c.sendMessage(" ::help Takes you to the help zone");
}
You still have yet to learn the code option when posting, please redo all posts.
?Code:if (PlayerHandler. [j].playerRights > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 300000) { c2.sendMessage("[HELP MESSAGE] <shad=15536940>"+Misc.optimizeText(c.playerName)+" </shad> Has requested help."); c.lastHelp = System.currentTimeMillis(); } } } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |