OnPlayerWantsDismount
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object OnPlayerWantsDismount( BasePlayer player, BaseMountable instance )
{
Puts( "OnPlayerWantsDismount works!" );
return null;
}Location
- BaseMountable::RPC_WantsDismount(BaseEntity.RPCMessage msg)
csharp
//---
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);
}
}