$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.