Skip to content

setVehicleComponentVisible(false) doesn't apply for damaged parts #2528

@h03original

Description

@h03original

Describe the bug

When using setVehicleComponentVisible on a vehicle to hide a component, only the _ok child gets hidden, but for example, breaking the front bumper after that, the damaged component part (the one with the _dam dummy child) gets visible.

To reproduce

addEventHandler("onClientVehicleEnter", getRootElement(),
    function()
        local getComponent = getVehicleComponents(source) -- get a table with all the components of the vehicle
        for k in pairs (getComponent) do
            setVehicleComponentVisible(source, k, false) -- hides the component
        end
    end
)
  • Enter a vehicle then crash into a wall.

Expected behaviour

Handle _ok and _dam parts independently when using component related functions, or just make all children disappear when hiding a dummy.

Screenshots
bug1
bug2

Version

Server 1.5.9-release-21118
Client v1.5.9-release-21118

Additional context

Can't complete my tuning script :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions