[L4D2]How to add damage sources to flying objects (containers, cars, truck)
I want that characters other than tanks can calculate the damage caused by hitting flying objects, etc. (containers, cars, trucks).
For example, when I use this Plugins https://forums.alliedmods.net/showthread.php?t=126831 In versus mode, when the charger hits the car and hits the survivor, the panel will not calculate the damage.:3 I try to add PHP Code:
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Can't understand what you are trying to say, be more clear.
Check if this is what you are looking for l4d2_hittable_control This plugin allows changing the damage from hittables If you want to block the damage from charger hittables then I think you need to store somewhere which infected did the last hit, and check if is a charger, ignore the damage. |
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Quote:
When i use this pluginCharger Power. In versus mode: Charger uses its abilities to move cars and cause damage to survivors. The Tab panel does not calculate this damage score, But if the tank fist moves the car and causes damage to the survivors, the Tab panel calculates the damage score. I need to move the car in charger, and the Tab panel will calculate the damage score. Thank you for your reply, Mr. Marttt.:) |
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
You set the "m_hPhysicsAttacker" to the client who last hit it, or maybe "m_hLastAttacker" but I believe it's the former. Then it should credit who hit the object with kills/damage. Some datamap variable like that. Don't have time to check.
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Quote:
But after testing, I got this error. Code:
Exception reported: Property "m_hPhysicsAttacker" not found (entity 116/prop_physics) PHP Code:
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
datamap not sendprop. Prop_Data.
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Quote:
Should it be used like this? PHP Code:
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Yeah, where are you putting the code?
Edit: I do this in one of my plugins: PHP Code:
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Quote:
PHP Code:
|
Re: [L4D2]How to add damage sources to flying objects (containers, cars, truck)
Yep that seems right, just add in setting float and give it a go. I remember I fixed this in some 3rd party plugin, guess it wasn't this. Hmm.
|
All times are GMT -4. The time now is 01:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.