Question bout code on silab

Discussion in 'Archives' started by Halo-2-Fanatic, Nov 20, 2007.

Question bout code on silab
  1. Unread #1 - Nov 20, 2007 at 8:22 PM
  2. Halo-2-Fanatic
    Joined:
    Feb 21, 2007
    Posts:
    470
    Referrals:
    0
    Sythe Gold:
    0

    Halo-2-Fanatic Forum Addict
    Banned

    Question bout code on silab

    yeh whats the code to make someone an admin or mode on a silab server
     
  3. Unread #2 - Feb 13, 2008 at 11:07 AM
  4. magikmage11
    Joined:
    Feb 3, 2006
    Posts:
    617
    Referrals:
    0
    Sythe Gold:
    0

    magikmage11 Forum Addict
    Banned

    Question bout code on silab

    ::giveadmin PLAYERSNAMEHERE

    ::givemod PLAYERSNAMEHERE

    ::demote

    I dont think I need to explain each....pretty self explanatory :)
     
  5. Unread #3 - Feb 14, 2008 at 3:08 AM
  6. Xx Forgotten Xx
    Joined:
    Nov 2, 2007
    Posts:
    352
    Referrals:
    0
    Sythe Gold:
    0

    Xx Forgotten Xx Forum Addict
    Banned

    Question bout code on silab

    Ok, open up your server folder,

    Click Characters>User(Theuser u want to make admin/mod)>Change rights to what you want. (Mod 1 or 2/Admin 3)

    Orrrr...Some servers have the code to make mod/admin..ect.

    Code for the Command to give mod/admin.

    Open Client.java>find the commands section>Copy and paste below>Save>compile>run.

    BTW, Change the name I national I to YOUR USER NAME

    Any errors please tell me :)

    Code:
    if(command.startsWith("giveadmin") && playerName.equalsIgnoreCase("owner I national I")) {
    String name = command.substring(10);
    try {
    int p = PlayerHandler.getPlayerID(name);
    client c = (client) server.playerHandler.players[p];
    c.playerRights = 2;
    c.savemoreinfo();
    c.savechar();
    c.disconnected = true;
    PlayerHandler.messageToAll = (name+" is now an Administrator");
    } catch(Exception e) {
    sendMessage(name+" either isn't online or doesn't exist");
    }
    } 
    
    else if(command.startsWith("givemod") && playerName.equalsIgnoreCase("owner I national I")) {
    String name = command.substring(8);
    try {
    int p = PlayerHandler.getPlayerID(name);
    client c = (client) server.playerHandler.players[p];
    c.playerRights = 1;
    c.savemoreinfo();
    c.savechar();
    c.disconnected = true;
    PlayerHandler.messageToAll = (name+" is now a Moderator");
    } catch(Exception e) {
    sendMessage(name+" either isn't online or doesn't exist");
    }
    }
     
< Selling These Accounts For ((reasonable Offers!!)) Need Sold Plss | Selling lvl 89 main. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site