local randommarker = createMarker(0, 0, 0, "cylinder", 1, 255, 255, 255)
local x,y,z = 2137, 2137, 10 -- tepa w wybrane miejsce
addEventHandler("onMarkerHit", randommarker, function(source)
veh = createVehicle(597, 3213, 2137, 20+1)
setElementData(veh, "destroyafterimpact", true)
end)
addEventHandler("onVehicleDamage", root, function(dmg)
local plr = getVehicleOccupant(source)
if plr and getElementData(source, "destroyafterimpact") then
destroyElement(source)
outputChatBox("* Tw?j pojazd zosta? usuni?ty z powodu obra?e?.\nIlo?? straconego HP pojazdu przy uderzeniu: "..tonumber(dmg), plr, 255, 255, 255) -- druga cz??? w tek?cie nieobowi?zkowa
setElementPosition(plr, x, y, z)
end
end)