GetVehicleDamageStatus
tipp
For some useful functions for working with vehicle damage values, see here.
Description
Retrieve the damage statuses of a vehicle.
| Name | Description |
|---|---|
| vehicleid | The ID of the vehicle to get the damage statuses of. |
| VEHICLE_PANEL_STATUS:panels | A set of bits containing the panel damage status. See Panel States |
| VEHICLE_DOOR_STATUS:doors | A set of bits containing the door damage status. See Door States |
| VEHICLE_LIGHT_STATUS:lights | A set of bits containing the light damage status. See Light States |
| VEHICLE_TIRE_STATUS:tires | A set of bits containing the tire damage status. See Tire States |
Returns
1 - The function was executed successfully.
0 - The function failed to execute. This means the vehicle specified does not exist.
Examples
new
VEHICLE_PANEL_STATUS:panels,
VEHICLE_DOOR_STATUS:doors,
VEHICLE_LIGHT_STATUS:lights,
VEHICLE_TYRE_STATUS:tyres;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tyres);
printf("Vehicle Status: [Panels]: %d - [Doors]: %d - [Lights]: %d - [Tyres]: %d", panels, doors, lights, tyres);
Related Functions
- 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
- OnVehicleDamageStatusUpdate: Called when a vehicle's damage state changes.