GetVehicleDamageStatus
From SA-MP Wiki
Check the damage values of a vehicle.
(vehicleid, &panels, &doors, &lights, &tires)
| vehicleid | The ID of the vehicle you want to get the damage of. |
| panels | The integer to store the panel damage data in, passed by reference. |
| doors | The integer to store the door damage data in, passed by reference. |
| lights | The integer to store the light damage data in, passed by reference. |
| tires | The integer to store the tire damage data in, passed by reference. |
new panels,doors,lights,tires; GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires); printf("Vehicle Status : [Panels] : %d - [Doors] : %d - [Lights] : %d - [Tires] : %d",panels,doors,lights,tires);
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- UpdateVehicleDamageStatus: Update the vehicle damage.
- SetVehicleHealth: Set the health of a vehicle.
- GetVehicleHealth: Check the health of a vehicle.
- RepairVehicle: Fully repair a vehicle.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnVehicleDamageStatusUpdate: Called when a vehicle's damage state changes.
