OnElevatorButtonPress
Usage
- Return a non-null value or bool to override default behavior
Example Autogenerated
csharp
private void OnElevatorButtonPress( ElevatorLift instance, BasePlayer player, Direction direction, bool flag )
{
Puts( "OnElevatorButtonPress works!" );
}
Location
- ElevatorLift::Server_RaiseLowerFloor(BaseEntity/RPCMessage msg)
csharp
[BaseEntity.RPC_Server, BaseEntity.RPC_Server.IsVisible(3f)]
public void Server_RaiseLowerFloor(BaseEntity.RPCMessage msg)
{
Elevator.Direction direction = (Elevator.Direction)msg.read.Int32();
bool flag = msg.read.Bit();
if (Interface.CallHook("OnElevatorButtonPress", this, msg.player, direction, flag) != null)
{
return;
}
base.SetFlag((direction == Elevator.Direction.Up) ? BaseEntity.Flags.Reserved1 : BaseEntity.Flags.Reserved2, true, false, true);
this.owner.Server_RaiseLowerElevator(direction, flag);
//---