Scaling vertices to make them aligned

Hi guys,
I’m trying to find how to scale vertices to make them aligned. In 3dsmax selecting and scaling the vertices on z axis was enough but i don’t know how to do it in blender.
How do i do it?

Make sure that you are using the correct trandform pivot point. It must not be individual origins as that makes the vertices scale individually with themselves.

thank you!