This callback was added in SA-MP 0.3a and will not work in earlier versions!
This does not include vehicle health changes
(vehicleid, playerid)
vehicleid
The ID of the vehicle that was changed its damage status.
playerid
The ID of the player who synced the change in the damage status (who had the car damaged or repaired).
Prevent tire popping
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
// Get the damage status of all the components
new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
// Set the tires to 0, which means none are popped
tires = 0;
// Update the vehicle's damage status with unpopped tires
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
return 1;
}
For some useful functions for working with vehicle damage values, see here.
The following functions might be useful, as they're related to this callback in one way or another.