---
title: "GetVehicleDamageStatus | open.mp"
description: "Retrieve the damage statuses of a vehicle."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/GetVehicleDamageStatus
language: th
---

# GetVehicleDamageStatus

## คำอธิบาย

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 variable to store the panel damage data in, passed by reference. |
| VEHICLE\_DOOR\_STATUS:doors | A variable to store the door damage data in, passed by reference. |
| VEHICLE\_LIGHT\_STATUS:lights | A variable to store the light damage data in, passed by reference. |
| VEHICLE\_TYRE\_STATUS:tyres | A variable to store the tire damage data in, passed by reference. |

## ส่งคืน

**1** - The function was executed successfully.

**0** - The function failed to execute. This means the vehicle specified does not exist.

## ตัวอย่าง

```c
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);
```

## บันทึก

เคล็ดลับ

-   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.

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   [UpdateVehicleDamageStatus](https://omp.itsneufox.com/th/docs/scripting/functions/UpdateVehicleDamageStatus): Update the vehicle damage.
-   [SetVehicleHealth](https://omp.itsneufox.com/th/docs/scripting/functions/SetVehicleHealth): Set the health of a vehicle.
-   [GetVehicleHealth](https://omp.itsneufox.com/th/docs/scripting/functions/GetVehicleHealth): Check the health of a vehicle.
-   [RepairVehicle](https://omp.itsneufox.com/th/docs/scripting/functions/RepairVehicle): Fully repair a vehicle.

## Related Callbacks

-   [OnVehicleDamageStatusUpdate](https://omp.itsneufox.com/th/docs/scripting/callbacks/OnVehicleDamageStatusUpdate): Called when a vehicle's damage state changes.

## Related Resources

-   [Damage Status](https://omp.itsneufox.com/th/docs/scripting/resources/damagestatus)
-   [Vehicle Panel Status](https://omp.itsneufox.com/th/docs/scripting/resources/vehicle-panel-status)
-   [Vehicle Door Status](https://omp.itsneufox.com/th/docs/scripting/resources/vehicle-door-status)
-   [Vehicle Light Status](https://omp.itsneufox.com/th/docs/scripting/resources/vehicle-light-status)
-   [Vehicle Tire Status](https://omp.itsneufox.com/th/docs/scripting/resources/vehicle-tire-status)
