Skip to content

IOnBasePlayerAttacked

WARNING

This is an internal hook and will not be called in plugins. See Internal Hooks for more information.

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void IOnBasePlayerAttacked( BasePlayer instance, HitInfo info )
{
    Puts( "IOnBasePlayerAttacked works!" );
}

Location

  • BasePlayer::OnAttacked(HitInfo info)
csharp
public override void OnAttacked(HitInfo info)
{
	if (Interface.CallHook("IOnBasePlayerAttacked", this, info) != null)
	{
		return;
	}
	float health = base.health;
	if (this.InSafeZone() && !this.IsHostile() && info.Initiator != null && info.Initiator != this)
//---

Released under the MIT License.