UpdateVehicleDamageStatus
Description:
Function UpdateVehicleDamageStatus sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels.
Function UpdateVehicleDamageStatus was added in 0.3a and will not work in earlier versions! |
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 set the damage of. |
int | panels | A set of bits containing the panel damage status. |
int | doors | A set of bits containing the door damage status. |
int | lights | A set of bits containing the light damage status. |
int | tires | A set of bits containing the tire damage status. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute. The vehicle does not exist.
Examples:
new panels, doors, lights, tires; GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires); UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15); //Setting tires to 15 will pop them all
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetVehicleHealth: Set the health of a vehicle.
- GetVehicleHealth: Check the health of a vehicle.
- RepairVehicle: Fully repair a vehicle.
- GetVehicleDamageStatus: Get the vehicle damage state for each part individually.
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.