getVehicleUpgrades
Shared
Returns every tuning upgrade fitted on a vehicle.
table|false getVehicleUpgrades(vehicle vehicle)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
Returns
A list of the upgrades' model names, or false if they could not be read.
Example
addCommandHandler("upgrades", function(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle then
outputDebugString(table.concat(getVehicleUpgrades(vehicle), ", "))
end
end)Coming from MTAMTA uses numeric upgrade ids (1000 to 1193). Here an upgrade is its model's name, and the slots are the ones the mounted packs declare.