Blockland Forums > Modification Help
CTRL K take over
<< < (2/3) > >>
cciamlazy:

--- Quote from: SpreadsPlague on March 08, 2011, 12:29:28 AM ---cough cough you can set your own message with this too cough cough

and if this isn't what you're looking for, use it as an example on how to overwrite a function

--- End quote ---

No I'm doing something a little different.
Iban:

--- Quote from: SpreadsPlague on March 08, 2011, 12:29:28 AM ---and if this isn't what you're looking for, use it as an example on how to overwrite a function

--- End quote ---
that mod is awful and terrible holy mother of god that sucks


--- Code: ---package Self Delete_Override
{
function serverCmdToggleSelf Delete(%client)
{
if(!%client.isAdmin)
return;

$Sucide_Enabled = !$Sucide_Enabled;

if($Sucide_Enabled)
messageAll('', "\c3" @ %client.name @ "\c6 has \c3enabled"\c6 Self Delete.");
else
messageAll('', "\c3" @ %client.name @ "\c6 has \c3enabled"\c6 Self Delete.");
}

function serverCmdSelf Delete(%client)
{
if($Sucide_Enabled)
return parent::serverCmdSelf Delete(%client);
}
}

activatePackage(Self Delete_Override);
--- End code ---
SpreadsPlague:

--- Quote from: Iban on March 08, 2011, 12:40:10 AM ---that mod is awful and terrible holy mother of god that sucks

--- End quote ---

my apologies for being a stuffty scripter

also you have two lines reading the same "enabled" message and misspelled Self Delete when checking for the enabled variable in the bottom function everywhere except function names and package name

just saying
Iban:

--- Quote from: SpreadsPlague on March 08, 2011, 12:43:40 AM ---my apologies for being a stuffty scripter

--- End quote ---
Everything is so verbose and awkward. You need to refine that.
SpreadsPlague:

--- Quote from: Iban on March 08, 2011, 12:44:17 AM ---Everything is so verbose and awkward. You need to refine that.

--- End quote ---

I know. I'm very rusty - and although this is a poor excuse it was quite some time ago that I made that. I was actually meaning to read up on your scripting guides - they seem in depth and would probably enlighten me on how to do this correctly.
Navigation
Message Index
Next page
Previous page

Go to full version