function notifyAboutExplosion() local col = getElementData(source, "parent") local x1, y1, z1 = getElementPosition(source) id, x, y, z = getElementData(col, "spawn")[1], getElementData(col, "spawn")[2], getElementData(col, "spawn")[3], getElementData(col, "spawn")[4] setTimer(respawnDayZVehicle, 1800000, 1, id, x, y, z, source, col, getElementData(col, "MAX_Slots")) setElementData(col, "deadVehicle", true) setElementData(source, "isExploded", true) createExplosion(x1 + 4, y1 + 1, z1, 4) createExplosion(x1 + 2, y1 - 4, z1, 4) createExplosion(x1 - 1, y1 + 5, z1, 4) createExplosion(x1 - 4, y1, z1 - 2, 4) end addEventHandler("onVehicleExplode", getRootElement(), notifyAboutExplosion)
id, x, y, z = getElementData(col, "spawn")[1], getElementData(col, "spawn")[2], getElementData(col, "spawn")[3], getElementData(col, "spawn")[4]