M MY Multiplayer: Wiki
Side
Kind

getElementComponents

Client

Lists a vehicle's or object's components: the named frames of its model.

table|false getElementComponents(vehicle|object element)

Parameters

NameTypeDescription
elementvehicle|objectThe vehicle or object.

Returns

A table with each component's name as the key and true or false for whether it is visible, or false if the model has no components.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    for name, visible in pairs(getElementComponents(vehicle)) do
        outputDebugString(name .. ": " .. tostring(visible))
    end
end
Coming from MTAThe same as MTA's getVehicleComponents, but it also works on objects whose model has frames.

See also