Skip to content

OnLiftUse

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnLiftUse( Lift instance, BasePlayer player )
{
    Puts( "OnLiftUse works!" );
}
csharp
private void OnLiftUse( ProceduralLift instance, BasePlayer player )
{
    Puts( "OnLiftUse works!" );
}

Location

  • Lift::RPC_UseLift(BaseEntity/RPCMessage rpc)
  • ProceduralLift::RPC_UseLift(BaseEntity/RPCMessage rpc)
csharp
//---
{
	if (!rpc.player.CanInteract())
	{
		return;
	}
	if (Interface.CallHook("OnLiftUse", this, rpc.player) != null)
	{
		return;
	}
	this.MoveUp();
}
csharp
//---
{
	if (!rpc.player.CanInteract())
	{
		return;
	}
	if (Interface.CallHook("OnLiftUse", this, rpc.player) != null)
	{
		return;
	}
	if (base.IsBusy())
	{
//---

Released under the MIT License.