The way the system TJW has in ET:Pub works is that there are 2 cvars, g_minHits and g_teamDamageRestriction. You set g_minHits to something, so it requires whatever number of hits on a foe to start calculating team damage. Once you pass minHits, it starts to calculate team damage, and if it gets high enough kick. Killing the opposite teams players or structures could lower the amount done, and players can see their status by typing /damage.
Example:
I have g_minHits set to 10.
I have g_teamDamageRestriction set to 50%.
UnnamedPlayer connects
UnnamedPlayer spawns as human
UnnamedPlayer shoots the nearest human dead
UnnamedPlayer is kicked
SkIlledPlayer is playing. He accidentally hits a teammate and kills him. Since he has killed 20 aliens, he isnt kicked, because his teamdamage is -20 or some number. He quicly types /damage, and sees that he will not be kicked, but he has been lowered to 0 teamdamage.