Differentiating between health and armor -
Puppy - 28.06.2015
Okay, so I am working on a system which requires me to be able to track health AND armor SEPARATELY using a callback such as OnPlayerTakeDamage or OnPlayerGiveDamage.
What can I do to (accurately) gain the armor and the health in a different variable? Thank you for any help.
Re: Differentiating between health and armor -
M4D - 28.06.2015
take a look at this include code:
https://sampforum.blast.hk/showthread.php?tid=195439
it should be help you
Re: Differentiating between health and armor -
kyriakos587 - 28.06.2015
If you mean you dont know what is armor or health:
the defferent is if you have armor and someone shot you, you will start to loose Armor HP so you will not die to fast.
If you don't have armor and you have only the red progress(HP) you will die faster.
Re: Differentiating between health and armor -
Pottus - 28.06.2015
I don't know what M4D is thinking that filterscript is useless these days. The best system to look at in my view would have to be Slices weapon system. This system takes care of every aspect of damage by calculating all health and armor server side.
https://sampforum.blast.hk/showthread.php?tid=563387
Re: Differentiating between health and armor -
eddiemaddox - 28.06.2015
Take a look on it
https://sampforum.blast.hk/showthread.php?tid=195439
Re: Differentiating between health and armor -
Ritzy2K - 28.06.2015
Quote:
Originally Posted by kyriakos587
If you mean you dont know what is armor or health:
the defferent is if you have armor and someone shot you, you will start to loose Armor HP so you will not die to fast.
If you don't have armor and you have only the red progress(HP) you will die faster.
|
you're dumb ..
and yes use slices damage system the sync is amazing!
Re: Differentiating between health and armor -
Puppy - 29.06.2015
But I don't really want all that, I don't want an include
I just want to differentate between the health the armor lost, more specifically in a OnPlayerTakeDamage type callback. My last resort would be to store the player's current armor in OnPlayerTakeDamage and make a timer about 5 seconds after the callback to get the kevlar lost.
Re: Differentiating between health and armor -
Suicidal.Banana - 30.06.2015
You will have to store the armour amount, because in OnPlayerTakeDamage, 'the damage was already taken' so to speak, so checking armour then and 5 seconds later wouldnt show any difference.
Instead, save armour when you set it, then everytime it changes in OnPlayerTakeDamage
Heres a bit of code to get you going:
http://pastebin.com/g9MC4EMR
In all honesty i didn't actually test it though, but see no reason why that approach wouldn't work