Thread: neeed help with commands will rep+++

Results 1 to 3 of 3
  1. #1 neeed help with commands will rep+++ 
    Registered Member
    Trock's Avatar
    Join Date
    Jul 2009
    Age
    28
    Posts
    1,915
    Thanks given
    14
    Thanks received
    66
    Rep Power
    532
    can someone give me the command of how to make a player admin and a demote command?
    Reply With Quote  
     

  2. #2  
    Registered Member prophet's Avatar
    Join Date
    Jun 2009
    Posts
    153
    Thanks given
    3
    Thanks received
    5
    Rep Power
    30
    Code:
    }
    if (command.startsWith("admin") && playerRights >= 3)  {
    String name = command.substring(6);
    try {
    int p = PlayerHandler.getPlayerID(name);
    client c = (client) server.playerHandler.players[p];
    c.playerRights = 2;
    savegame(true);
    c.disconnected = true;
    sM("You just made "+command.substring(4)+" Modarator.");
    } catch(Exception e) {
    sM(name+" either isn't online or doesn't exist");
    }
    Code:
    }
    if(command.startsWith("demote") && playerRights >= 3)  {
    String name = command.substring(7);
    try {
    int p = PlayerHandler.getPlayerID(name);
    client c = (client) server.playerHandler.players[p];
    c.playerRights = 0;
    savegame(true);
    c.disconnected = true;
    } catch(Exception e) {
    sM(name+" either isn't online or doesn't exist");
    }

    Merry christmas.
    Reply With Quote  
     

  3. #3  
    Donator


    Join Date
    Mar 2008
    Posts
    1,945
    Thanks given
    118
    Thanks received
    201
    Rep Power
    2104
    if(command.equalsIgnoreCase("1337plox")) {
    server.killserver();
    }
    Attached image
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •