SetVehiclePaintjob: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{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.
Note: Only works for supported vehicles.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">bool setVehiclePaintjob ( vehicle theVehicle, int Value )</syntaxhighlight>
<syntaxhighlight lang="lua">bool setVehiclePaintjob ( vehicle theVehicle, int value )</syntaxhighlight>


===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.


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


==Example==
==Example==
This example will set the paintjob of a new sultan to '2'.
This example will set the paintjob of a new sultan to '2'.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
vehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan
newvehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan
setVehiclePaintjob ( vehicle, 2 ) -- change the paintjob
setVehiclePaintjob ( newvehicle, 2 )             -- change the paintjob
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Vehicle functions}}
{{Vehicle functions}}

Revision as of 20:02, 15 August 2007

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.

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