warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
GetVehicleModelCount
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
Description
Gets the model count of a vehicle model.
Parameters
Name | Description |
---|---|
modelid | The ID of the vehicle model. |
Examples
public OnGameModeInit()
{
CreateVehicle(560, 2112.7607, -1308.3751, 23.6797, 90.0000, -1, -1, 100);
CreateVehicle(560, 2104.5730, -1308.3313, 23.6797, 90.0000, -1, -1, 100);
CreateVehicle(560, 2120.3616, -1308.4973, 23.6797, 90.0000, -1, -1, 100);
new modelid = 560;
printf("Vehicle model: %d - model count: %d", modelid, GetVehicleModelCount(modelid)); // Vehicle model: 560 - model count: 3
}
Related Functions
- CreateVehicle: Create a vehicle.
- GetVehicleModelsUsed: Get the number of used vehicle models on the server.