Skip to content

OnPlayerPveDamage

Usage

  • Return a non-null value or bool to override default behavior

Example Autogenerated

csharp
private void OnPlayerPveDamage( BaseEntity Initiator, HitInfo info, BuildingBlock instance )
{
    Puts( "OnPlayerPveDamage works!" );
}

Location

  • BuildingBlock::Hurt(HitInfo info)
csharp
//---
			}
		}
		base.Hurt(info);
		return;
	}
	if (Interface.CallHook("OnPlayerPveDamage", info.Initiator, info, this) != null)
	{
		return;
	}
	(info.Initiator as BasePlayer).Hurt(info.damageTypes.Total(), Rust.DamageType.Generic, null, true);
}

Released under the MIT License.