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

Function

getVehicleUpgrades

Server and clientVehiclesIdentical to MTA:SA

Returns the IDs of all tuning parts fitted to a vehicle. Works on both sides.

Syntax

table getVehicleUpgrades(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

An array of part IDs (empty when there is no tuning).

Example

addCommandHandler("czesci", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if not vehicle then return end
    for _, part in ipairs(getVehicleUpgrades(vehicle)) do
        outputChatBox(part .. " (" .. getVehicleUpgradeSlotName(part) .. ")", player)
    end
end)

See also