Forums Index >> Modding >> how do you make new admin logins?
Page : <1> :
You are, lots of bugs in there but you are
Oh then dont forget you need to make the commands check for the admin types, but thats included on my script :P
Yea I know that (basicially this)
if(!ClientIsAdmin(%sender,"/ki command failed you are not admin"))
return;
Would need to be this
if(!ClientIsSuperAdmin(%sender,"/ki command failed you are not Super admin"))
return;
Yea but im working on SERVER:RESPONCE first
thanks though
But HOW do I know if im getting close?
Trial and error my friend... Trial and error XD
Page : <1> :
How do you make them? (a.k.a. /min /dic /god)
//-----------------------------------------------------
// handle admin logins, boot the player if login fails.
function admin_login(%sender,%a2,%admin_type)
{
%pw = trim(firstWord(%a2));
If(%pw $= "PASSWORD")
{
%msg = "ADMIN LOGIN FAILED. YOU MUST SET YOUR OWN PASSWORD IN game/server/dash/prefs.cs!";
schedule(1000,false,"CommandToClient", %sender,'BottomPrint', %msg,4,3);
return;
}
If(%pw $= $pref::Server::AdminPassword)
{
if(%admin_type $= "admin")
%sender.isAdmin=1;
else if(%admin_type $= "stealth")
%sender.isStealthAdmin=1;
%a1 = "SERVER RESPONSE ";
%a2 = "SERVER RESPONSE: AUTHENTICATION SUCCESSFUL";
chatMessageClient(%sender, %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
}
else
if(%admin_type $= "Super")
%sender.isSuperAdmin=1;
%a1 = "SERVER RESPONSE ";
%a2 = "SERVER RESPONSE: AUTHENTICATION SUCCESSFUL,YOU ARE NOW A SUPER ADMIN";
chatMessageClient(%sender, %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
}
else
{
%a1 = "SERVER RESPONSE ";
%a2 = "SERVER RESPONSE: AUTHENTICATION FAILED";
chatMessageClient(%sender, %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
%name = %sender.nameBase;
%sender.delete( %name SPC $pref::Server::FailedAdminLogin);
schedule(1000,false,"centerprintall", %sender.nameBase SPC $pref::Server::FaliedAdminLogin ,4);
}
}
Am I on the right track?