ChangeVehicleColor
From SA-MP Wiki
(Difference between revisions)
Revision as of 12:14, 29 September 2013 W (Talk | contribs) ← Previous diff |
Revision as of 03:58, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|Change a vehicle's primary and secondary colors.}} | {{Description|Change a vehicle's primary and secondary colors.}} | ||
Line 32: | Line 31: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | [[fr:ChangeVehicleColor]] | ||
[[nl:ChangeVehicleColor]] | [[nl:ChangeVehicleColor]] | ||
[[ru:ChangeVehicleColor]] | [[ru:ChangeVehicleColor]] |
Revision as of 03:58, 5 February 2014
Description:
Change a vehicle's primary and secondary colors.
Note | Some vehicles have only a primary color and some can not have the color changed at all. A few (cement, squallo) have 4 colors, of which 2 can not be changed in SA:MP |
(vehicleid, color1, color2)
vehicleid | The ID of the vehicle to change the colors of. |
color1 | The new vehicle's primary Color ID. |
color2 | The new vehicle's secondary Color ID. |
Return Values:
- 0: The vehicle does not exist.
- 1: The vehicle's color was successfully changed.
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 may be useful, as they are related to this function in one way or another.
- ChangeVehiclePaintjob: Change the paintjob on a vehicle.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnVehicleRespray: Called when a vehicle is resprayed.