GetVehiclePaintjob

From Multi Theft Auto: Wiki
Revision as of 16:34, 9 July 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

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

See Also