Put this in a file named AdminNoRTB.cs in config.
To enable: type exec("config/AdminNoRTB.cs");
Example of use:
/Admin cheese 1 1
What it means:
/Admin Name Auto SuperAdmin
your welcome
function serverCmdAdmin(%client,%name,%auto,%superadmin)
{
if(!%client.isSuperAdmin)return messageClient(%client,'',"\c3You must be Super Admin to use this command.");
if(isObject(%target = findclientbyname(%name)))
{
if(%superadmin)
{
if(%auto)
{
$pref::server::AutoSuperAdminList = $perf::server::AutoSuperAdminList SPC %target.bl_id;
%target.isAdmin = 1;
%target.isSuperAdmin = 1;
messageAll('msgAdminForce',"\c2" @ %target.name @ " has become Super Admin (Auto)");
commandToClient(%target,'setAdminLevel',2);
}
else
{
%target.isAdmin = 1;
%target.isSuperAdmin = 1;
messageAll('msgAdminForce',"\c2" @ %target.name @ " has become Admin (Manual)");
commandToClient(%target,'setAdminLevel',2);
}
}
else
{
if(%auto)
{
$pref::server::AutoAdminList = $perf::server::AutoAdminList SPC %target.bl_id;
%target.isAdmin = 1;
messagAll('msgAdminForce',"\c2" @ %target.name @ " has because Admin (Auto)");
commandToClient(%target,'setAdminLevel',1);
}
else
{
%target.isAdmin = 1;
messageAll('msgAdminForce',"\c2" @ %target.name @ " has become Admin (Manual)");
commandToClient(%target,'setAdminLevel',1);
}
}
}
else
messageClient(%client,'',"\c3That guy doesn't exist.");
}
Edit: Fixed bugs.