• Log in or sign up for an account here: https://www.sythe.org/login

Question bout code on silab

Halo-2-Fanatic

Forum Addict

Banned
Joined
Feb 21, 2007
Sythe Gold
0
Messages
470
yeh whats the code to make someone an admin or mode on a silab server
 
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");
}
}
 
Runescape Gamblingrunescape gambling
Back
Top