GetVehicleDamageStatus
Description:
Function GetVehicleDamageStatus retrieve the damage statuses of a vehicle.
Function GetVehicleDamageStatus was added in 0.3a and will not work in earlier versions! |
The stored values are bit masks. Bitwise operators will allow you to use the values. |
For some useful functions for working with vehicle damage values, see here. |
Parameters:
(vehicleid, &panels, &doors, &lights, &tires)
int | vehicleid | The ID of the vehicle to get the damage statuses of. |
int | panels | A variable to store the panel damage data in, passed by reference. |
int | doors | A variable to store the door damage data in, passed by reference. |
int | lights | A variable to store the light damage data in, passed by reference. |
int | tires | A variable to store the tire damage data in, passed by reference. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute. This means the vehicle specified does not exist.
Examples:
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 well, as they are related to this callback in one way or another.
- OnVehicleDamageStatusUpdate: Called when a vehicle's damage state changes.