Author Topic: CTRL K take over  (Read 868 times)

How do I create a script to replace CTRL K with like a prompt or something? I am using this for a game mode I am creating but whatever I try I can't figure it out. Please Help.

function serverCmdSelf Delete(%client)

seems like you're trying to disable Self Delete or something

seems like you're trying to disable Self Delete or something
Ya pretty much

function serverCmdSelf Delete(%client)
Thanks Iban

Ya pretty much

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

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

No I'm doing something a little different.

and if this isn't what you're looking for, use it as an example on how to overwrite a function
that mod is awful and terrible holy mother of god that sucks

Code: [Select]
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);

that mod is awful and terrible holy mother of god that sucks

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
« Last Edit: March 08, 2011, 12:45:38 AM by SpreadsPlague »

my apologies for being a stuffty scripter
Everything is so verbose and awkward. You need to refine that.

Everything is so verbose and awkward. You need to refine that.

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.

that mod is awful and terrible holy mother of god that sucks

Code: [Select]
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);
You've got it printing enabled on both enabling and disabling, just so you know.