Blockland Forums > Modification Help
Setting Admin Levels
phflack:
how do you set the admin level? is it %client.isAdmin(0/1);? i told my friends to put that in the console but they said it gave an error, and i was wondering what was the correct way to toggle admin
howtoshotbillwetellyou:
%client.isadmin = 1; %client.isSuperAdmin=1;
Destiny/Zack0Wack0:
--- Code: ---%client.isAdmin = 1;
%client.isSuperAdmin = 0;
%client.sendPlayerListUpdate();
commandtoclient(%client,'setAdminLevel',1);
--- End code ---
or
--- Code: ---%client.isAdmin = 1;
%client.isSuperAdmin = 1;
%client.sendPlayerListUpdate();
commandtoclient(%client,'setAdminLevel',2);
--- End code ---
phflack:
thanks, then to deadmin, both isadmin and issuperadmin would be 0, and the adminlevel? also, for the sendplayerlistupdate, should i put that in a for loop to target everybody after deadmining people?
DrenDran:
--- Quote from: Destiny/Zack0Wack0 on January 19, 2011, 03:57:45 AM ----code snip-
--- End quote ---
--- Quote from: phflack on January 19, 2011, 04:38:37 PM ---thanks, then to deadmin, both isadmin and issuperadmin would be 0, and the adminlevel? also, for the sendplayerlistupdate, should i put that in a for loop to target everybody after deadmining people?
--- End quote ---
--- Code: ---%client.isAdmin = 1; //is the actual setting of the persons status that the server references when the client tries to do something
%client.isSuperAdmin = 0; //like before but for super admin
%client.sendPlayerListUpdate(); //this puts the S or A next to their name on their list they bring up with F2
commandtoclient(%client,'setAdminLevel',1); //This tells the client to unlock the admin options gui, and not popup the box asking for a password
--- End code ---
With comments.
:cookieMonster:
Basically, you'd just do this to deadmin someone:
--- Code: ---%client.isAdmin = 0; //is the actual setting of the persons status that the server references when the client tries to do something
%client.isSuperAdmin = 0; //like before but for super admin
%client.sendPlayerListUpdate(); //this puts the S or A next to their name on their list they bring up with F2
commandtoclient(%client,'setAdminLevel',0); //This tells the client to unlock the admin options gui, and not popup the box asking for a password
--- End code ---
Also, zack0wack0's code dosn't seem to include the green message that would say "%1 has become admin. (Manual)" you'd do that by
--- Code: ---messageall('msgadminforce',"\c2" @ %client.name @ " has become admin. (Manual)");
--- End code ---
Granted I'm not sure if it's supposed to be 'msgadminforce' exactly, but I can't find the correct one.