Differentiating between health and armor
#1

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.
Reply
#2

take a look at this include code: https://sampforum.blast.hk/showthread.php?tid=195439

it should be help you
Reply
#3

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.
Reply
#4

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
Reply
#5

Take a look on it
https://sampforum.blast.hk/showthread.php?tid=195439
Reply
#6

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!
Reply
#7

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.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)