SetVehiclePaintjob: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 9: Line 9:
===Required Arguments===
===Required Arguments===
*'''theVehicle''': The [[vehicle]] you wish to change the paintjob of.
*'''theVehicle''': The [[vehicle]] you wish to change the paintjob of.
*'''value''': A whole number representing the new paintjob id.
*'''value''': A whole number representing the new paintjob id. This is a number ranging from 0 up to 3.


==Returns==
==Returns==

Revision as of 19:38, 15 March 2009

This function changes the paintjob on the specified vehicle.
Note: Only works for supported vehicles.

Syntax

bool setVehiclePaintjob ( vehicle theVehicle, int value )

Required Arguments

  • theVehicle: The vehicle you wish to change the paintjob of.
  • value: A whole number representing the new paintjob id. This is a number ranging from 0 up to 3.

Returns

Returns true if the vehicle's paintjob was changed. Otherwise false.

Example

This example will set the paintjob of a new sultan to '2'.

newvehicle = createVehicle ( 560, 100, 100, 40 )  -- create the sultan
setVehiclePaintjob ( newvehicle, 2 )              -- change the paintjob

See Also