NullSystemWorks / mtadayz

Official MTA:DayZ Repository
Other
41 stars 35 forks source link

How about reducing the incoming damage by wearing an armor or a helmet ? #29

Closed dreezyduh closed 7 years ago

0xCiBeR commented 7 years ago

Well we could combine this with a gas helmet that reduces infection as in original Arma2:DayZ http://imgur.com/4WkuzrK

1B0Y commented 7 years ago

I actually like the idea. Fetches in some elements of the DayZ Stand-alone into play.

1B0Y commented 7 years ago

Can anyone reference the responsible script which handles player damage? Thanks.

mtadayz commented 7 years ago

handlers/players/client/player_damage.lua.

0xCiBeR commented 7 years ago

Any updates on this? @1B0Y

1B0Y commented 7 years ago

Implemented in ed7aacc1f268e67fab1f07a005ef3846a9010df0, however I have no idea how the loot table works, so i've requested @mtadayz if he can add helmet and moto to the table.

If you're wearing either the helmet or moto helmet, you can't be headshotted at all. However - this will later be modified so that either after a couple of shots to the helmet itself will result in the helmet being destroyed, or if the player uses a bigger gun (such as a sniper) it'll just penetrate it.

mtadayz commented 7 years ago

I modified it a bit because your code was checking if the player has the helmet in his inventory, not if he has it equipped. Also, snipers will deal full damage.