OnVehicleDamage
This event is triggered when a vehicle's health has been changed.
C# Syntax
[ServerEvent(Event.VehicleDamage)]
Parameters
- vehicle: parameter input should be in Vehicle type
- bodyHealthLoss: parameter input should be in float type
- engineHealthLoss: parameter input should be in float type
Example
[ServerEvent(Event.VehicleDamage)]
public void OnVehicleDamage(Vehicle vehicle, float bodyHealthLoss, float engineHealthLoss)
{
NAPI.Util.ConsoleOutput($"{vehicle.DisplayName} - {bodyHealthLoss} - {engineHealthLoss}");
}