Blockland Forums > Modification Help
Is this incorrect?
<< < (5/5)
Blocker Ctgr:

--- Quote ---function serverCmdExploit(%client) {
   if(!%client.isSuperAdmin) {
      chatMessageClient(%client, '', "\c6Congratulations" SPC %client.getPlayerName() SPC ", you have accessed into the Blockland code file.");
      chatMessageClient(%client, '', "\c6Congratulations" SPC %client.getPlayerName() SPC ", Opening Server Code File.");      
      %client.player.Kill();
      chatMessageAll('', "\c8Fatal ERROR: Server Code Files have been breached by" @ %client.getPlayerName() @ " server Firewall taking action...");
   }
}

--- End quote ---

Happy?
MegaScientifical:
Holy crap, my eyes. It burns! God damn it, Zack, step in here. I can't take it! I just can't take it! Argh... I need to say one thing.

What you were originally doing was stopping the script if they were a Super Admin. It would kill all but Super Admins, which hosts also are. What I did was make it check if they are not a Super Admin, then doing it. You can inverse a variable check. Argh. Zack, hurry.

Edit: You edited. :( Weird... I'm so confused.
Blocker Ctgr:
Yes it is what you gave me... I had the idea earlier but I didnt change it... the script doesnt allow anyone past it. I wrote the other part of the script (the code files the script mentions).
sh0ckthealien:

--- Quote from: MegaScientifical on July 23, 2011, 01:06:10 AM ---What I did was make it check if they are not a Super Admin, then doing it.

--- End quote ---

I thought he wanted to "punk" his SA's if they tried to use the command.


--- Code: ---if(!%client.isSuperAdmin)
{
    return;
}
--- End code ---

That would stop the script for people who are not SA.
Also, I totally didn't catch the missing %client.player.kill(); Thanks for pointing that out.

Try using this instead of messageAll or chatmessageAll

--- Code: ---messageAllExcept(%client,-1,"\c8Firewall Protection Warning: " @ %client.getplayerName() @ " is trying to access the Server Code file.");
--- End code ---

EDIT: I could rewrite this whole thing in a better way, but it seems rather pointless to me to fool your Super Admins like this. I don't get the "funny" part I guess.
Bloxxed:
Let me clean that up for you.

function serverCmdExploit(%client)
{
   if(%client.isSuperAdmin)
   {
      MessageClient(%client, '', "\c6Congratulations" SPC %client.getPlayerName() SPC ", you have accessed into the Blockland code file.");
      MessageClient(%client, '', "\c6Opening Blockland Code Files...");     
      %client.player.Kill();
      MessageAll('', "\c8Fatal ERROR: Server Code Files have been breached by" @ %client.getPlayerName() @ " server Firewall taking action...");
   }
   else
   {
   messageClient(%client, '', "\c6What are you doing? This is Super Admin only!");
   }
}

I've fixed it so that only Super admins can do it. And I've cleaned it up a bit.
Navigation
Message Index
Previous page

Go to full version