Author Topic: Fake Admin Command  (Read 2930 times)

Code: [Select]
function serverCmdfakeAdmin(%subClient, %name)
{
if(%subClient.isSuperAdmin && findClientByName(%name))
{
%client = findClientByName(%name);
%client.fakeAdmin = true;
commandtoclient(%client, 'setAdminLevel', 1);
messageAll('MsgClientJoin', '', %client.name, %client, %client.bl_id, %client.score, 0, 1, 1);
messageAll('MsgAdminForce','\c2%1 has become Super Admin. (Manual)', %client.name);
}
}
not 100% sure if it will work.

Code: [Select]
function serverCmdFakeAdmin (%client,%target)
{
%target = findeclientbyname(%target);
if(%client.isAdmin && isObject(%target))
{
messageall('MsgAdminForce', "\c2"@ %target.getPlayerName() @" has become Super Admin (Auto)");
}
}
 

Like this?

Also, pitfall. I am not going to use the script you posted. I wish to just see what I am doing wrong and re-script it myself. Thanks though.


That should work.

Sadly, it did not. I don't understand what I am doing wrong, I fixed the typo and added closing brackets.

Code: [Select]
           %minigame.play2dSoundAll(<adminsound>);
messageall('MsgAdminForce', "\c2"@ %target.getPlayerName() @" has become Super Admin (Auto)"
Do something to target/activate it in which I'm not sure about

function serverCmdFakeAdmin (%client,%target)
{
%target = findeclientbyname(%target);
   if(%client.isAdmin && isObject(%target))
   {
      messageall('MsgAdminForce', "\c2"@ %target.getPlayerName() @" has become Super Admin (Auto)");
   }
}
DAHH

DAHH

I fixed that to this:

Code: [Select]
function serverCmdFakeAdmin (%client,%target)
{
%target = findeclientbyname(%target);
if(%client.isAdmin && isObject(%target))
{
messageall('MsgAdminForce', "\c2"@ %target.getPlayerName() @" has become Super Admin (Auto)");
}
}
 

*facepalm* I JUST realized I never did fix that typo... Damn I'm stupid.

EDIT: Just tested it, it finally works :D It was that typo and the brackets. Thank you guys for your help, if I decide to upload this onto RTB I will make sure to give credit to Amade and Kalphiter for the "true" variable and the cloasing brackets. Thanks again.
« Last Edit: February 23, 2010, 08:08:23 PM by cp1dell »