ChangeVehiclePaintjob

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:06, 21 April 2014
MP2 (Talk | contribs)

← Previous diff
Current revision
Romz (Talk | contribs)

Line 8: Line 8:
{{Returns|This function always returns '''1''' (success), even if the vehicle passed is not created.}} {{Returns|This function always returns '''1''' (success), even if the vehicle passed is not created.}}
 +
 +{{Bug|
 +* This function calls [[OnVehicleRespray]].
 +* Vehicles change their color to white anymore when a paintjob is removed.}}
{{Example}} {{Example}}

Current revision



Description:

Change a vehicle's paintjob (for plain colors see ChangeVehicleColor).


Parameters:
(vehicleid, paintjobid)
vehicleidThe ID of the vehicle to change the paintjob of.
paintjobidThe ID of the Paintjob to apply. Use 3 to remove a paintjob.


Return Values:

This function always returns 1 (success), even if the vehicle passed is not created.


Image:32px-Circle-style-warning.png

Warning

Known Bug:
  • This function calls OnVehicleRespray.
  • Vehicles change their color to white anymore when a paintjob is removed.


Example Usage:

new rand = random(3); // Will either be 0 1 or 2 (all valid)
ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), rand); // changes the paintjob of the player's current vehicle to a random one

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools