Skip to content

CanPickupEntity

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanPickupEntity( BasePlayer player, BaseCombatEntity instance )
{
    Puts( "CanPickupEntity works!" );
}

Location

  • BaseCombatEntity::CanPickup(BasePlayer player)
csharp
public virtual bool CanPickup(BasePlayer player)
{
	object returnvar = Interface.CallHook("CanPickupEntity", player, this);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	return this.pickup.enabled && (!this.pickup.requireBuildingPrivilege || player.CanBuild()) && (!this.pickup.requireHammer || player.IsHoldingEntity<Hammer>()) && player != null && !player.IsInTutorial;
//---

Released under the MIT License.