跳到主要内容

GetVehicleDamageStatus

提示

For some useful functions for working with vehicle damage values, see here.

Description

Retrieve the damage statuses of a vehicle.

NameDescription
vehicleidThe ID of the vehicle to get the damage statuses of.
VEHICLE_PANEL_STATUS:panelsA variable to store the panel damage data in, passed by reference.
VEHICLE_DOOR_STATUS:doorsA variable to store the door damage data in, passed by reference.
VEHICLE_LIGHT_STATUS:lightsA variable to store the light damage data in, passed by reference.
VEHICLE_TYRE_STATUS:tyresA variable to store the tire damage data in, passed by reference.

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