Is there a reliable way to get and set the body damage of a vehicle?

I’ve searched for a while now, I wanted to know if there’s a native or something that I might have missed.

This native and this one are the only ones that I found that get somewhat close to what I want, but haven’t found a way to use them reliably.

The SetVehicleDamage native does damage the body, but I don’t know how would I get the offsets of the damaged parts that I’d want to use on another moment.

I don’t think there is a way to do this with native functions and I think the best indicator for this is the fact that in GTA5 and GTA:Online, you’ll never see a vehicle save it’s deformation state across sessions or missions.

The only conclusion I can come to is that there is no way to achieve this currently though, vehicle deformation is synchronised over the network meaning it can at least be serialised and thus stored in some way. This would have to be implemented as a CFX native but it is at least possible, just not possible right now.

So it seems, at least I wanted to be sure that I had exhausted my options before leaving this issue behind for now. Thank you for your answer.

Somewhat late here, but there is a solution out there.

Open source and contains everything you need :slight_smile:

It uses offsets of a vehicle and GetVehicleDeformationAtPos to put all the data into a table and then SetVehicleDamage to apply said damage again.
While not perfect, I think it is the closest we can achieve right now.