Help how do i make people lose armor when they take damage

I am making a gamemode and i have the whole health this sorted but when i shoot my freinds they dont lose armour they only lose health please help. Also how do i make someone armor 100 automatically.

thanks

or