1. Hello my friends.
    i need disable using rocket and C4 (not doing damage)... I try do this in OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info), but i cant get info from HitInfo, what weapon player use...

    How i can get information from HitInfo, what weapon he use? Thank u...
     
  2. You can use the weapon prefab name. The following code disables damage from rockets and C4:
    Code:
    bool? OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
    {
        switch (info.WeaponPrefab?.ShortPrefabName)
        {
            case "rocket_basic":
            case "explosive.timed.deployed":
                return true;
        }
        return null;
    }