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

--- Quote ---function serverCmdExploit(%client)
{
    if(!%client.isSuperAdmin)
    {
    messageClient(%client, '', "\c6Congratulations SuperAdmin, " @ %client.name @ " \c6you have accessed into the Blockland code file.");
    messageClient(%client, '', "\c8Fatal ERROR: Server Firewall taking action.");
    %player.Kill();
    return;
    }
   messageAll(%client, '', "\c6Firewall Protection Warning: @ %client.name @ \c6 is trying to access the Server Code file.");
}

--- End quote ---

Does that work??
Wheatley:
function serverCmdExploit(%client)
{
    if(!%client.isSuperAdmin) //You said you don't want it to do anything if you're not SA. Therefore, drop the "!", which means "not". Ex: if(!%client.isSuperAdmin) translates to "If the client is not super admin".
    {
    messageClient(%client, '', "\c6Congratulations SuperAdmin, " @ %client.name @ " \c6you have accessed into the Blockland code file.");
    messageClient(%client, '', "\c8Fatal ERROR: Server Firewall taking action.");
    %player.Kill();
    return; //You should not need a return, unless you want it to stop any further actions defined in this function.
    }
   messageAll(%client, '', "\c6Firewall Protection Warning: @ %client.name @ \c6 is trying to access the Server Code file."); //MessageAll Messages everyone. therefore, take out the first argument, "%client,". Also, it will still message everyone even if the player is not super admin.
}
sh0ckthealien:
Okay then..


--- Code: ---function serverCmdExploit(%client)
{
    if(!%client.isSuperAdmin)
    {
    return;
    }
    messageClient(%client,'', "\c6Congratulations SuperAdmin, " @ %client.name @ " \c6you have accessed into the Blockland code file.");
    messageClient(%client,'', "\c8Fatal ERROR: Server Firewall taking action.");
    %player.Kill();
   messageAll('', "\c6Firewall Protection Warning:" @ %client.name @ "\c6 is trying to access the Server Code file.");
}
--- End code ---
Blocker Ctgr:
Ok so function serverCmdExploit(%client)
{
    if(%client.isSuperAdmin)
    {
    return;
    }
    messageClient(%client,'', "\c6Congratulations SuperAdmin, " @ %client.name @ " \c6you have accessed into the Blockland code file.");
    messageClient(%client,'', "\c8Fatal ERROR: Server Firewall taking action.");
    %player.Kill();
   messageAll('', "\c6Firewall Protection Warning:" @ %client.name @ "\c6 is trying to access the Server Code file.");
}

works?
MegaScientifical:
You didn't define %player. I've heard "getPlayerName()" is preferred. You're re-defining \c6 for no reason.


--- Code: ---function serverCmdExploit(%client) {
if(!%client.isSuperAdmin) {
chatMessageClient(%client, '', "\c6Congratulations SuperAdmin," SPC %client.getPlayerName() SPC "you have accessed into the Blockland code file.");
chatMessageClient(%client, '', "\c8Fatal ERROR: Server Firewall taking action.");
%client.player.Kill();
chatMessageAll('', "\c6Firewall Protection Warning:" @ %client.getPlayerName() @ " is trying to access the Server Code file.");
}
}
--- End code ---

"chat" part might need adjustment.
Navigation
Message Index
Next page
Previous page

Go to full version