Vehicle on change health callback
forward OnVehicleHealthChanged(vehicleid, Float:oldhealth, Float:newhealth, bool:scriptcall);
scriptcall = true if vehicle health changed by SetVehicleHealth or RepairVehicle functions.
ZVEHHEALTH_TICKRATE 300
public OnVehicleHealthChanged(vehicleid, Float:oldhealth, Float:newhealth, bool:scriptcall)
{
if (scriptcall) {
printf("Vehicle health has been changed (SetVehicleHealth, RepairVehicle).");
} else {
printf("Vehicle health has been changed (crashed).");
}
printf("Vehicleid: %d. Old: %f, new: %f.", vehicleid, oldhealth, newhealth);
}