This function was added in SA-MP 0.3a and will not work in earlier versions!
(component)
component
The component ID to check.
public OnVehicleMod(playerid, vehicleid, componentid)
{
new componentType = GetVehicleComponentType(componentid);
if(componentType != -1)
{
new clientMessage[41];
format(clientMessage, sizeof(clientMessage), "You have modified your vehicle on slot %i", componentType);
SendClientMessage(playerid, 0xFFFFFFFF, clientMessage);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "The component is invalid.");
}
return 1;
}
The following functions may be useful, as they are related to this function in one way or another.
The following callbacks might be useful, as they're related to this function in one way or another.