C#:
using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine.UIElements;
namespace Oxide.Plugins
{
[Info("MiniCopterCrashFix", "Artur_Meteor", "1.0.1")]
class MiniCopterCrashFix : RustPlugin
{
object OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
{
var player = entity as BasePlayer;
if (player != null)
{
if (info.Initiator is Minicopter)
{
info.damageTypes.ScaleAll(0);
}
if (info.Initiator is ScrapTransportHelicopter)
{
info.damageTypes.ScaleAll(0);
}
if (info.Initiator is AttackHelicopter)
{
info.damageTypes.ScaleAll(0);
}
}
return null;
}
}
}