- Documentation
- Shared functions
- getModelCompatibleUpgrades
Function
getModelCompatibleUpgrades
Like getVehicleCompatibleUpgrades, but for a model number, without creating a vehicle. Useful in a shop that shows parts before buying the car.
Syntax
table getModelCompatibleUpgrades(int model [, int slot = nil])Arguments
modelint- Vehicle model ID.
slotint, optional = nil- Slot number 0-16.
Returns
An array of part IDs.
Example
local parts = getModelCompatibleUpgrades(562)
outputDebugString("Elegy ma " .. #parts .. " czesci tuningu")
See also
getVehicleCompatibleUpgradesReturns the tuning parts that fit this vehicle, based on the game's data (the carmods list plus wheels for regular cars). The result can be narrowed to one slot. Ideal for building a workshop menu.setModelCompatibleUpgradesStores your own list of parts that fit a vehicle model, e.g. for a new model fromengineRequestModel.