ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onVehicleDamage

Event

onVehicleDamage

ServerVehiclesIdentical to MTA:SA

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)

See also