[TF2] Both max and current health stops adding after taking damage
I was making a custom attribute to gain max and current health for backstabs until 11 kills, but the attribute just stops working when you take damage. I can't seem to understand why it happens, but when you go to resupply you can start gaining max health and heal again. The stock below is a TakeDamage SDKHook.
Code:
stock Action:Attribute_SpyGetSouls_OnTakeDamage(victim, &attacker, slot, &Float:damage, &damagetype, Float:damageForce[3], Float:damagePosition[3], damageCustom, &weapon, bool:bBuilding) |
Re: [TF2] Both max and current health stops adding after taking damage
Attributes are reset when you touch a resupply (if the weapon is reapplied, anyways).
Can't really do any further debugging without a full plugin (or at least a minimal one that shows the same results), but that is definitely not a TakeDamage SDKHook callback (it doesn't have slots, nor a bool for buildings). If you're doing kills though, I'd recommend doing all your checks in a player_death event. |
Re: [TF2] Both max and current health stops adding after taking damage
Quote:
The plugin is for CW3. I'm not including slots or bool for buildings, because I'm not uisng those for the attribute. I found SDKHooks easier to code with. Also, I tried player_death event, but the attribute didn't work at all, even though it compiled with no errors or warnings. I'll show the whole plugin tomorrow, because it's late for me right now. |
All times are GMT -4. The time now is 11:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.