How to change the health and shield of all players without changing their teams

Someone know how to make the max health remain even after elimination?