GetVehicleUpgrades

From Multi Theft Auto: Wiki
Revision as of 01:49, 11 June 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns a table of all the upgrades on a specifed vehicle.

Syntax

table getVehicleUpgrades ( vehicle )

Optional Arguments

  • vehicle: The vehicle you wish to retrieve the upgrades of.

Returns

Returns a table of all the upgrades on each slot of a vehicle, 0 if un-used.

Example

addEventHandler ( "onPlayerEnterVehicle", root, "onPlayerEnterVehicle" )
function onPlayerEnterVehicle ( vehicle, seat, jacked )
  upgrades = getVehicleUpgrades ( vehicle )
  for upgradeKey, upgradeValue in upgrades do
    outputChatBox ( getVehicleUpgradeSlotName ( upgradeKey - 1 ) .. ": " .. upgradeValue )
  end
end

See Also