Skip to content

OnVehicleModuleMove

Usage

  • Return a non-null value or bool to override default behavior

Example Autogenerated

csharp
private void OnVehicleModuleMove( BaseVehicleModule moduleForItem, BaseModularVehicle instance, BasePlayer player )
{
    Puts( "OnVehicleModuleMove works!" );
}

Location

  • BaseModularVehicle::CanMoveFrom(BasePlayer player, Item item)
csharp
//---
	BaseVehicleModule moduleForItem = this.GetModuleForItem(item);
	if (!(moduleForItem != null))
	{
		return true;
	}
	object returnvar = Interface.CallHook("OnVehicleModuleMove", moduleForItem, this, player);
	if (returnvar != null)
	{
		return returnvar is bool && (bool)returnvar;
	}
	return moduleForItem.CanBeMovedNow();
//---

Released under the MIT License.