I've made a plugin to stop certain player entities taking damage but i want the heli excluded from the list. I've managed to allow the minigun to inflict damage with:
if (!(info?.Initiator is BaseHelicopter))
{
//cancel damage
}
but it doesn't catch the rockets.
Any help is appreciated and thanks in advance.
Possible to track heli rockets from OnEntityTakeDamage()Solved
if (info.WeaponPrefab.ShortPrefabName == "rocket_heli")
Absolute legend, thank you very much.
don't forget to check if WeaponPrefab is null before checking its ShortPrefabName
Locked automatically