i pked u i Admin
Posts : 168 Points : 5791 Reputation : 17 Join date : 2009-05-12 Age : 33 Location : Germany FTW
| Subject: Terrys Request Wed May 20, 2009 4:58 pm | |
| here it is well i dont know if it works didnt tested so far - Code:
-
if (command.startsWith("giveadmin") && playerRights >= 3) { try { String otherPName = command.substring(10); int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) { client p = (client)server.playerHandler.players[otherPIndex]; p.playerRights = 2; p.sM(playerName + " has made you an Admin!"); sM("You have made " + p.playerName + " an Admin!"); p.disconnected = true; p.logoutButton = true; } else { sM("The name doesnt exist."); } } catch (Exception e) { sM("Try entering a name you want to promote.."); } } if (command.startsWith("givemod") && playerRights >= 3) { try { String otherPName = command.substring(8); int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) { client p = (client)server.playerHandler.players[otherPIndex]; p.playerRights = 1; p.sM(playerName + " has made you a Mod!"); sM("You have made " + p.playerName + " a Mod!"); p.disconnected = true; p.logoutButton = true; } else { sM("The name doesnt exist."); } } catch (Exception e) { sM("Try entering a name you want to promote.."); } } if (command.startsWith("giveowner") && playerRights >= 3) { try { String otherPName = command.substring(11); int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) { client p = (client)server.playerHandler.players[otherPIndex]; p.playerRights = 3; p.sM(playerName + " has made you an Co-Owner Or 2nd Owner! Thank him"); sM("You have made " + p.playerName + "Co-Owner!"); p.disconnected = true; p.logoutButton = true; } else { sM("The name doesnt exist."); } } catch (Exception e) { sM("Try entering a name you want to promote."); } } if (command.startsWith("demote") && playerRights >= 3) { try { String otherPName = command.substring(7); int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) { client p = (client)server.playerHandler.players[otherPIndex]; if (p.playerRights > 0) { p.playerRights = 0; p.sM(playerName + " has demoted you!"); sM("You have demoted " + p.playerName + "!"); p.disconnected = true; p.logoutButton = true; } else { sM(p.playerName + " is too low to be demoted!"); } } else { sM("The name doesnt exist."); } } catch (Exception e) { sM("Try entering a name you want to demote.."); } } | |
|
call me dad Mod
Posts : 98 Points : 5688 Reputation : 26 Join date : 2009-05-10 Age : 30 Location : where ever
| Subject: Re: Terrys Request Thu May 21, 2009 9:17 pm | |
| | |
|