please tell me a native or another way to restore the door on the car if it is torn off
This in a client script should work.
player = PlayerPedId()
playerVehicle = GetVehiclePedIsUsing(player)
SetVehicleBodyHealth(playerVehicle, 1000.0)
SetVehiclePetrolTankHealth(playerVehicle, 1000.0)
-- SetVehicleWheelHealth(playerVehicle, 1000.0)
-- SetVehicleUndriveable(playerVehicle, false)
-- SetVehicleEngineHealth(playerVehicle, 1000.0)
RemoveDecalsFromVehicle(playerVehicle)
SetVehicleDeformationFixed(playerVehicle)
SetVehicleFixed(playerVehicle)
Sorry, i need restore only one, nearest door, not all vehicle. I see video on YouTube from Tiger, in this video restored boot on vehicle. Sorry for my bad English
I found the answer. there is no such bait. therefore, it is necessary to remember the door damage model. use
SetVehicleDeformationFixed(vehicle);
SetVehicleFixed(vehicle);
and then run through the cycle and remove unnecessary doors, leaving the required one. If anyone is interested in the details, write me the code