Class VehicleData
Provides utility functions and data for vehicle operations.
public static class VehicleData
- Inheritance
-
VehicleData
- Inherited Members
Methods
CarColourIndexToColour(int, uint)
Converts a car color index to a color value.
public static extern Colour CarColourIndexToColour(int index, uint alpha = 255)
Parameters
Returns
- Colour
The color value corresponding to the index.
GetRandomVehicleColour(int, out int, out int, out int, out int)
Gets random colors for a vehicle.
public static extern void GetRandomVehicleColour(int modelId, out int colour1, out int colour2, out int colour3, out int colour4)
Parameters
modelIdintThe vehicle model ID.
colour1intThe output parameter for the first color.
colour2intThe output parameter for the second color.
colour3intThe output parameter for the third color.
colour4intThe output parameter for the fourth color.
GetVehicleComponentSlot(int)
Gets the slot of a specific vehicle component.
public static extern int GetVehicleComponentSlot(int component)
Parameters
componentintThe component ID.
Returns
- int
The slot ID of the component.
GetVehicleModelInfo(int, VehicleModelInfoType, out Vector3)
Retrieves information about a vehicle model.
public static extern bool GetVehicleModelInfo(int model, VehicleModelInfoType type, out Vector3 outInfo)
Parameters
modelintThe vehicle model ID.
typeVehicleModelInfoTypeThe type of information to retrieve.
outInfoVector3The output parameter to store the retrieved information.
Returns
GetVehiclePassengerSeats(int)
Gets the number of passenger seats for a vehicle model.
public static extern byte GetVehiclePassengerSeats(int model)
Parameters
modelintThe vehicle model ID.
Returns
- byte
The number of passenger seats in the vehicle model.
IsValidComponentForVehicleModel(int, int)
Checks if a component is valid for a specific vehicle model.
public static extern bool IsValidComponentForVehicleModel(int vehicleModel, int componentId)