- Documentation
- Shared functions
- getVehicleComponents
Function
getVehicleComponents
Returns a vehicle model's parts as a table of name → visible. On the client, for a model from a file (engineReplaceModel) it is the full list of .dff frames (body, doors, bonnet, bumpers, wheel_*_dummy wheels, the author's variants); for game cars only parts changed by script. On the server only parts changed by script.
Syntax
table getVehicleComponents(vehicle vehicle)Arguments
vehiclevehicle- The vehicle.
Returns
A table { [name] = bool }.
Example
addCommandHandler("czesci", function()
local vehicle = getPedOccupiedVehicle(localPlayer)
if not vehicle then return end
for name, visible in pairs(getVehicleComponents(vehicle)) do
outputChatBox(name .. (visible and "" or " (ukryta)"))
end
end)