/// <summary> /// Create a component instance from a vehicle /// </summary> public Component(BaseVehicle vehicle, ComponentType type, ComponentBase relativeBase = ComponentBase.root) { this.vehicle = vehicle; this.component = type.ToString().ToLower(); Base = relativeBase; }
/// <summary> /// Create a component instance from a vehicle using a string as type /// </summary> public Component(BaseVehicle vehicle, string type, ComponentBase relativeBase = ComponentBase.root) { this.vehicle = vehicle; this.component = type; Base = relativeBase; }
/// <summary> /// Attach this trailer to a vehicle /// </summary> public bool AttachTo(BaseVehicle vehicle) { return(MtaShared.AttachTrailerToVehicle(element, vehicle.MTAElement)); }