Armour is just the same as health, just that you put it under "default" in the switch, as i explained in the last line.

I am not exactly sure if your implementation accounts for the transition from health to armor, like if a player gets hit with 30 damage and is only left with 15 armor. Do you mind elaborating a little bit on that? I don't know if I'm missing something.

Quote:

Originally Posted by CalvinC

And infact i think he would be left with 0.99 health in your example, since GetPlayerHealth rounds the health, while SetPlayerHealth does not.
Atleast that's what it said on the wiki, but even if SetPlayerHealth rounds too, the player would need to receive 49.5 damage to round up to 50.

But if you want to be that accurate you can, it wouldn't differ more than 0.5 at most though.

Well, I once had a timer that was supposed to reduce the player's health by 0.1 and ended up reducing it 1.0 per tick. That leads to the assumption that as long as there is ANY decimal number, even if it is really really small, SetPlayerHealth rounds up to the next integer.