Skip to content

OnPlayerDismountFailed

Usage

  • No return behavior

Example Autogenerated

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

Location

  • BaseMountable::RPC_WantsDismount(BaseEntity.RPCMessage msg)
csharp
//---
public void RPC_WantsDismount(RPCMessage msg)
{
	BasePlayer player = msg.player;
	if (!HasValidDismountPosition(player))
	{
		Interface.CallHook("OnPlayerDismountFailed", player, this);
	}
	else if (Interface.CallHook("OnPlayerWantsDismount", player, this) == null && (!(player != null) || !player.IsRestrained))
	{
		AttemptDismount(player);
	}
//---

Released under the MIT License.