as we can see, there’s an exist native function that’s
SET_VEHICLE_DAMAGE(Vehicle vehicle, float xOffset, float yOffset, float zOffset, float damage, float radius, BOOL p6);
but the problem is, is there a command like GetVehicleDamage ?, because I making a vehicle save system and i try to find a way to get the current damage float, Thank
SetVehicleDamage allow you to make damage at specific position. But I don’t think there is a function to get all of those damages.
There are some function to get health of some vehicle’s part, but no specific damage as you want:
// 0xF271147EB7B40F12 0x2B2FCC28
// GetVehicleBodyHealth
float GET_VEHICLE_BODY_HEALTH(Vehicle vehicle);
// 0xC45D23BAF168AAB8 0x8880038A
// GetVehicleEngineHealth
float GET_VEHICLE_ENGINE_HEALTH(Vehicle vehicle);
// 0x7D5DABE888D2D074 0xE41595CE
// GetVehiclePetrolTankHealth
float GET_VEHICLE_PETROL_TANK_HEALTH(Vehicle vehicle);
I found another function to help you:
// 0x4EC6CFBC7B2E9536 0xABF02075
// GetVehicleDeformationAtPos
Vector3 GET_VEHICLE_DEFORMATION_AT_POS(Vehicle vehicle, float offsetX, float offsetY, float offsetZ);
1 Like
this seem to be working with SET_VEHICLE_DAMAGE , ill check this out and will tell if this work , thank you
i tryna make a car visual look saving
In what file should i write it in? (sry for bad english)