Jump to content

actual damage hitinfo


mrdecoder

Recommended Posts

hi im using the shield plugin wich is realy cool but it does the damage wrong 
to get damage atm we use info.damageTypes.Total()
but this gives the gun damage and not actual damage

for example atm the shield plugin gives you a shield of lets say 20
and you put an enemy on 100mtr away from you with an ak
and that enemy shoots you in the leg from 100 mtr away
in a normal case damage is arround 20/30 so lets say its 25
then without shield it would be 100 -25 = 75
but if i put the shield on it uses the gun damage wich is 50 so if i have 100 health and 20 from shield then the moment i get shot it will be -50
i would have 70 left
so shield not work because of this

i need a code section that gives the actual damage 
i heard from some developers i need to use ProtectionProperties of the BaseCombatEntity

but i could not find an example of this and therefor i not understand it 

i tryed to get help on the discord and even on more discords but like always, developers never actualy want to help 
and more try to push you in good direction or they give you half a code , to see if your brain explodes

its like trying to learn chinese from a chinese learnbook in chinese
all anwsers are there but no way to read it 

so as a last resort i try here,

i have developers in my discord but most if not all never have time or they say yes and 5 months ltr still nothing 

so let me know if any of you have time for this 
ill pay offcourse 

i need it fast tho 
im already working on this problem for 5 days now 😞
 

Link to comment
Share on other sites

  • 3 weeks later...

damageTypes.Total is the sum of all damage types in hitInfo, so it's all correct. Just read how much shield you have at the moment and subtract what you need, then reduce the damage in hitInfo by how much you did with the shield

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1.1m

Downloads

Total number of downloads.

5.8k

Customers

Total customers served.

84.4k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.