Block damages between two players on the same team.
hook.Add( "PlayerShouldTakeDamage", "AntiTeamkill", function( ply, attacker )
ifply:Team() ==attacker:Team() thenreturnfalse-- that will block damage if attacker and ply is on the same team.endend )