Author Topic: Making a script ban people for a length of time on death.  (Read 907 times)

I know how to script some, but I don't know the syntax for the on death package, nor how to ban someone. (though script) Anyone here know?

look at ban hammer might help

I don't know the syntax for the on death package,
I don't know either but please try a search before you make a topic.
nor how to ban someone

ban(ID,TIME,"REASON"); if this isn't correct, its ban(TIME,ID,"REASON");

Wouldn't you need to use %player instead of ID?

Code: [Select]
package BanOnDeath
{
function gameConnection::onDeath(%client,%source,%killer,%type,%location)
{
Parent::onDeath(%client,%source,%killer,%type,%location);
ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes
}
};
activatePackage(BanOnDeath);
Something along the lines of this is what you want.

Code: [Select]
package BanOnDeath
{
function gameConnection::onDeath(%client,%source,%killer,%type,%location)
{
Parent::onDeath(%client,%source,%killer,%type,%location);
ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes
}
};
activatePackage(BanOnDeath);
Something along the lines of this is what you want.

Awesome!

Code: [Select]
package BanOnDeath
{
function gameConnection::onDeath(%client,%source,%killer,%type,%location)
{
Parent::onDeath(%client,%source,%killer,%type,%location);
ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes
}
};
activatePackage(BanOnDeath);
Something along the lines of this is what you want.
add a check for host or no :s

You're the one who said not to spoon feed him..

You're the one who said not to spoon feed him..
Am I truly spoonfeeding him by giving him a suggestion?

Code: [Select]

$banadmins = false;
$banondeath = true;

function serverCmdtoggledeathban(%client)
{
if(%client.isSuperAdmin)
{
$banondeath = !$banondeath;
}
}

function serverCmdbanadminsondeath(%client)
{
if(%client.isSuperAdmin)
{
$banadmins = !$banadmins;
}
}

package BanOnDeath
{
function gameConnection::onDeath(%client,%source,%killer,%type,%location)
{
            if(!((%client.isAdmin && !$banadmins) || %client.isSuperAdmin) && $banondeath)
            {
Parent::onDeath(%client,%source,%killer,%type,%location);
ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes
            }
}
};
activatePackage(BanOnDeath);


Thanks guys.