Table of Contents

Interface IVehicleInfoService

Namespace
SampSharp.Entities.SAMP
Assembly
SampSharp.OpenMp.Entities.dll

Provides functionality for getting information about vehicle models and components.

public interface IVehicleInfoService

Methods

GetColorFromVehicleColor(int, uint)

Gets the Color representation of the specified vehicleColor.

Color GetColorFromVehicleColor(int vehicleColor, uint alpha = 255)

Parameters

vehicleColor int

The vehicle color.

alpha uint

The alpha value of the result.

Returns

Color

A Color value representing the specified vehicle color.

GetComponentType(int)

Gets the car mod type of the specified componentId.

CarModType GetComponentType(int componentId)

Parameters

componentId int

The identifier of the component.

Returns

CarModType

The car mod type of the component.

Exceptions

ArgumentOutOfRangeException

Thrown if the specified componentId is invalid.

GetModelInfo(VehicleModelType, VehicleModelInfoType)

Gets information of type specified by infoType for the specified vehicleModel.

Vector3 GetModelInfo(VehicleModelType vehicleModel, VehicleModelInfoType infoType)

Parameters

vehicleModel VehicleModelType

The model of the vehicle.

infoType VehicleModelInfoType

The type of information to get.

Returns

Vector3

The information about the vehicle model.

GetPassengerSeatCount(VehicleModelType)

Gets the number of passenger seats in the specified vehicleModel.

int GetPassengerSeatCount(VehicleModelType vehicleModel)

Parameters

vehicleModel VehicleModelType

The model of the vehicle.

Returns

int

The number of passenger seats excluding the driver seat.

GetRandomVehicleColor(VehicleModelType)

Gets a set of random colors for the specified vehicleModel as they would naturally appear in the game.

(int, int, int, int) GetRandomVehicleColor(VehicleModelType vehicleModel)

Parameters

vehicleModel VehicleModelType

The model of the vehicle.

Returns

(int, int, int, int)

The vehicle colors (color 1 - 4)

IsValidComponentForVehicle(VehicleModelType, int)

Returns a value indicating whether the specified componentId is valid for the specified vehicleModel.

bool IsValidComponentForVehicle(VehicleModelType vehicleModel, int componentId)

Parameters

vehicleModel VehicleModelType

The model of the vehicle.

componentId int

The component to check.

Returns

bool

true if the component is valid for the vehicle model; false otherwise.