Skip to content

CanMountEntity ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private object CanMountEntity( BasePlayer player, BaseMountable instance )
{
    Puts( "CanMountEntity works!" );
    return null;
}

Location ​

  • BaseMountable::MountPlayer(BasePlayer player)
csharp
public void MountPlayer(BasePlayer player)
{
	if (!(_mounted != null) && !(mountAnchor == null) && Interface.CallHook("CanMountEntity", player, this) == null)
	{
		player.EnsureDismounted();
		_mounted = player;
		Transform transform = mountAnchor;
		player.SetMounted(this);
//---

Released under the MIT License.