Body Armor?

Hello

Im workin on adding a body armor thing to my gamemode. Basically the player has a certain level and based on that level he gets a damage reduction percentage. I was looking for some insight on how to perform this. I know im gonna be using ScaleDamage() but how would i properly do that? Would the Hitgroup be HITGROUP_GENERIC???


player._ScaleDamage = 0.5;

Possibly wont work; it’s from the cider item; Kevlar.

Nope

Here you go:
**[Player.SetArmor

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.SetArmor)**
**[Player.Armor

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.Armor)**

Not what he’s asking for. He want the player to recieve half of the damage.

Its in the ScalePlayerDamage hook

im messin with this now



function GM:ScalePlayerDamage(ply,hitgroup,dmginfo)
	dmginfo:ScaleDamage(.50)
end


No luck though

just give them more armor if they are of a higher rank? same thing really

i sorta wanted to scale the damage like at level 1 you get 5 percent reduction and so on.

[lua]
dmginfo:ScaleDamage( 0.5 )
[/lua]

nothing wrong with that code at all, dont know why it wouldnt work :S

NVM

this works fine :slight_smile: