/// <summary> /// Creates a static <see cref="BaseVehicle" /> in the world. /// </summary> /// <param name="vehicletype">The model for the vehicle.</param> /// <param name="position">The coordinates for the vehicle.</param> /// <param name="rotation">The facing angle for the vehicle.</param> /// <param name="color1">The primary color ID.</param> /// <param name="color2">The secondary color ID.</param> /// <returns> The <see cref="BaseVehicle" /> created.</returns> public virtual BaseVehicle CreateStatic(VehicleModelType vehicletype, Vector3 position, float rotation, int color1, int color2) { var id = Internal.AddStaticVehicle((int)vehicletype, position.X, position.Y, position.Z, rotation, color1, color2); return(id == BaseVehicle.InvalidId ? null : BaseVehicle.FindOrCreate(id)); }