If you disable the ingame autokick something like this might work depending on the game:
Code:
#include <dbi>
#include <sourcemod>
#include <cstrike>
#include <clientprefs>
#include <sdktools>
public Plugin:myinfo =
{
name = "DontKickAdmins",
author = "Puppetmaster",
description = "Controls the kicking of admins",
version = "0.0.0",
url = "http://gamingzone.ddns.net/"
};
public OnPluginStart()
{
HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);
}
public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
if ( GetClientTeam(GetClientOfUserId(GetEventInt(event, "userid"))) == GetClientTeam(GetClientOfUserId(GetEventInt(event, "attacker"))) && GetUserAdmin(GetEventInt(event, "attacker")) == INVALID_ADMIN_ID)
{
KickClientEx(GetClientOfUserId(GetEventInt(event, "attacker")), "Goodbye");
}
return Plugin_Continue;
}
In counterstrike this will kick players that kill a team mate and are not admins.