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

Event

onElementDestroy

ServerElementsIdentical to MTA:SA

An element is about to be destroyed (it still exists).

Handler

addEventHandler("onElementDestroy", root, function() ... end)

Source

source is the element.

Example

addEventHandler("onElementDestroy", root, function()
    if getElementType(source) == "vehicle" then outputServerLog("Usuwam " .. getVehicleName(source)) end
end)

See also