getVehiclePaintjob | Multi Theft Auto: Wiki Skip to content

getVehiclePaintjob

Client-side
Server-side
Shared

Pair: setVehiclePaintjob

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function gets the current paintjob on the specified vehicle.

Note

Always returns 3 if paintjobs are not supported for the vehicle.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getPaintjob(...)
  • Variable: .paintjob

Syntax

int getVehiclePaintjob ( vehicle theVehicle )
Required Arguments
  • theVehicle: the vehicle you wish to get the paintjob of.

Returns

  • int: value

Returns an integer representing the current paintjob on the vehicle.

Code Examples

shared

This example will set the paintjob of a new sultan to '2', then check it was set.

newvehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan
setVehiclePaintjob ( newvehicle, 2 ) -- change the paintjob
paintjob = getVehiclePaintjob ( newvehicle )
if ( paintjob == 2 ) then
outputChatBox ( "the paintjob was successfully set" )
end

See Also

Vehicle Functions