GetVehiclePaintjob

From Multi Theft Auto: Wiki
Revision as of 18:12, 17 August 2007 by Arc (talk | contribs)
Jump to navigation Jump to search

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

Syntax

int getVehiclePaintjob ( vehicle theVehicle )

Required Arguments

  • theVehicle: The vehicle you wish to get the paintjob of.

Returns

Returns an integer representing the current paintjob on the vehicle.
Note: Returns '255' for default (no paintjob/plain).

Example

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