ChangeVehicleColor
From SA-MP Wiki
ChangeVehicleColor
This function allows you to change the primary and secondary colors of vehicles spawned in the game. There is no function available to edit the third color of a vehicle, which some have.
Note: Some vehicles have only a primary color and some can not have the color changed at all.
(vehicleid, color1, color2)
| vehicleid | The vehicle ID of which you want to change the colors. |
| color1 | The new vehicle's primary Color ID. |
| color2 | The new vehicle's secondary Color ID. |
This function does not return a specific value.
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { // Change the primary color to black and the secondary color to white ChangeVehicleColor(vehicleid, 0, 1); return 1; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- ChangeVehiclePaintjob: Change the paintjob on a vehicle.
