getVehicleCompatibleUpgrades | Multi Theft Auto: Wiki Skip to content

getVehicleCompatibleUpgrades

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns a table of all the compatible upgrades (or all for a specified slot, optionally) for a specified vehicle.

Syntax

getVehicleCompatibleUpgrades ( )

Code Examples

server

This example displays a list of all the compatible upgrades for a vehicle when you enter it.

function scriptOnPlayerEnterVehicle ( invehicle, seat, jacked )
local upgrades = getVehicleCompatibleUpgrades ( invehicle )
for upgradeKey, upgradeValue in ipairs ( upgrades ) do
outputChatBox ( getVehicleUpgradeSlotName ( upgradeValue ) .. ": " .. upgradeValue )
end
end
addEventHandler ( "onPlayerVehicleEnter", root, scriptOnPlayerEnterVehicle )

See Also

Vehicle Functions