முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

VehicleCanHaveComponent

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Is the component legal on the vehicle model?

NameDescription
modelidVehicle Model ID
componentID of the component to check.

Returns​

true - The component is legal on the vehicle.

false - The component is illegal on the vehicle.

Examples​

new vehicleid = GetPlayerVehicleID(playerid);

if (VehicleCanHaveComponent(GetVehicleModel(vehicleid), 1010))
{
SendClientMessage(playerid, 0x00FF00FF, "Nitro is legal on this vehicle.");
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Nitro is illegal on this vehicle.");
}