1. Code:
    namespace Oxide.Plugins
    {
        [Info("TestPlugin", "TestPlugin", "1.0.0")]
        public class TestPlugin : RustPlugin {
            void CanAttack(BasePlayer player) {
                Puts("CanAttack works!");
            }
        }
    }
    This shit does not work
     
  2. Wulf

    Wulf Community Admin

    CanAttack should work fine, but not sure if all attack methods are covered with it. @Mughisi mentioned he'd look into it though.
     
  3. I tested it recently, works with nothing. Haven't tried this recent update however.
     
  4. Wulf

    Wulf Community Admin

    Hmmm... might be that it got added to the Docs but not actually added. :p I know I had it with some changes, but it may have gotten stashed.
     
  5. OnPlayerAttack is called when Projectile reaches the target. It does not suit me

    OnWeaponFired is not called for melee.
    OnMeleeThrown works only for throwing
    CanAttack does not work at all

    I can not solve my task
     
  6. The method that the CanAttack hook is in is actually no longer being called by the game so a new location needs to be found.