Skip to content

CanSwapToSeat

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanSwapToSeat( BasePlayer player, BaseMountable instance )
{
    Puts( "CanSwapToSeat works!" );
}
csharp
private void CanSwapToSeat( BasePlayer player, ModularCarSeat instance )
{
    Puts( "CanSwapToSeat works!" );
}

Location

  • BaseMountable::CanSwapToThis(BasePlayer player)
  • ModularCarSeat::CanSwapToThis(BasePlayer player)
csharp
public virtual bool CanSwapToThis(BasePlayer player)
{
	object returnvar = Interface.CallHook("CanSwapToSeat", player, this);
	return !(returnvar is bool) || (bool)returnvar;
}
csharp
public override bool CanSwapToThis(BasePlayer player)
{
	object returnvar = Interface.CallHook("CanSwapToSeat", player, this);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	if (this.associatedSeatingModule.DoorsAreLockable)
//---

Released under the MIT License.