- Documentation
- Server events
- onVehicleDamage
Event
onVehicleDamage
A vehicle lost health (reported by its driver's or owner's game).
Handler
addEventHandler("onVehicleDamage", root, function(loss) ... end)Parameters
lossfloat- Health lost.
Source
source is the vehicle.
Example
addEventHandler("onVehicleDamage", root, function(loss)
if loss > 200 then outputServerLog(getVehicleName(source) .. " mocno uszkodzony") end
end)