예제 #1
0
 /// <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;
 }
예제 #2
0
 /// <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;
 }
예제 #3
0
 /// <summary>
 /// Attach this trailer to a vehicle
 /// </summary>
 public bool AttachTo(BaseVehicle vehicle)
 {
     return(MtaShared.AttachTrailerToVehicle(element, vehicle.MTAElement));
 }