mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Add spawnFlyingComponent & breakGlass arguments for setVehiclePanelState

Open FileEX opened this issue 1 year ago • 2 comments

This PR adds the spawnFlyingComponent argument (defaulting to true) to setVehiclePanelState, similar to what is available in setVehicleDoorState. Additionally, the PR introduces the feature to shatter the windscreen if windscreen_panel is set to 3; currently, the windscreen simply disappears.

Added breakGlass argument.

bool setVehiclePanelState(vehicle theVehicle, int panelID, int state [ , bool spawnFlyingComponent = true, bool breakGlass = false ] )

https://streamable.com/uxpph6

This PR helps avoid frustrating situations, such as when managing a garage of vehicles and changing their models. image

Closes #2122

FileEX avatar Jul 15 '24 18:07 FileEX