Table of Contents

Interface IVehiclesComponent.IManagedInterface

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

Represents the managed interface implemented by its unmanaged counterpart.

public interface IVehiclesComponent.IManagedInterface : IUnmanagedInterface
Inherited Members

Methods

Create(bool, int, Vector3, float, int, int, TimeSpan, bool)

Creates a new vehicle.

IVehicle Create(bool isStatic, int modelID, Vector3 position, float Z = 0, int colour1 = -1, int colour2 = -1, TimeSpan respawnDelay = default, bool addSiren = false)

Parameters

isStatic bool

true if the vehicle is static; otherwise, false.

modelID int

The model ID of the vehicle.

position Vector3

The position where the vehicle will be created.

Z float

The Z angle (rotation) of the vehicle. Default is 0.0f.

colour1 int

The primary color of the vehicle. Default is -1.

colour2 int

The secondary color of the vehicle. Default is -1.

respawnDelay TimeSpan

The respawn delay of the vehicle. Use Zero or a negative value to disable respawn.

addSiren bool

true if the vehicle should have a siren; otherwise, false. Default is false.

Returns

IVehicle

The created vehicle.

GetEventDispatcher()

Gets the event dispatcher for vehicle events.

IEventDispatcher<IVehicleEventHandler> GetEventDispatcher()

Returns

IEventDispatcher<IVehicleEventHandler>

The event dispatcher for vehicle events.

Models()

Retrieves the array of vehicle models.

ref VehicleModelsArray Models()

Returns

VehicleModelsArray

A reference to the array of vehicle models.