Difference between revisions of "SetVehiclePaintjob"

From Multi Theft Auto: Wiki
m
(Link to paintjob list)
 
Line 2: Line 2:
 
{{Server client function}}
 
{{Server client function}}
 
This function changes the paintjob on the specified vehicle. <br/>
 
This function changes the paintjob on the specified vehicle. <br/>
Note: Only works for supported vehicles.
+
See [[Paintjob|paintjob]] for list of supported vehicles.
  
 
==Syntax==
 
==Syntax==

Latest revision as of 17:13, 15 April 2014

This function changes the paintjob on the specified vehicle.
See paintjob for list of 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. Ranges 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

FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.6 r7485 ONWARDS
FROM VERSION 1.6 r7485 ONWARDS