RemoveVehicleComponent
Description:
Function RemoveVehicleComponent remove a component from a vehicle.
Parameters:
(vehicleid, componentid)
int | vehicleid | ID of the vehicle. |
int | componentid | ID of the component to remove. |
Return Values:
- 0 - The component was not removed because the vehicle does not exist.
- 1 - The component was successfully removed from the vehicle.
Examples:
//remove Nitro from vehicle number 1 RemoveVehicleComponent(1,1010);
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- AddVehicleComponent: Add a component to a vehicle.
- GetVehicleComponentInSlot: Check what components a vehicle has.
- GetVehicleComponentType: Check the type of component via the ID.
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnVehicleMod: Called when a vehicle is modded.
- OnEnterExitModShop: Called when a vehicle enters or exits a mod shop.