From Liberty Unleashed Wiki
This is called when the health of a vehicle changes.
- function onVehicleHealthChange( Vehicle veh, float oldHealth, float newHealth )
- veh - The pointer of the vehicle which health was changed
- oldHealth - The amount of health vehicle had before the change
- newHealth - The current health
This event does not handle return values.
This will tell the vehicle driver that they have damaged their vehicle.
- function onVehicleHealthChange( veh, oldhp, newhp )
- if ( oldhp > newhp )
- local driver = veh.Driver;
- if ( driver )
- MessagePlayer( "Seems you just scratched your vehicle.", driver );
- return 1;