ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getVehiclePaintjob

Function

getVehiclePaintjob

Server and clientVehiclesIdentical to MTA:SA

Returns the vehicle's paintjob number: 0-2, or 3 when it has none. Works on both sides.

Syntax

int getVehiclePaintjob(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

0-3.

Example

addCommandHandler("naklejka", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then setVehiclePaintjob(vehicle, (getVehiclePaintjob(vehicle) + 1) % 4) end
end)

See also