local veh = {}

veh[1] = createVehicle(411, -1946.064453125, 399.53125, 283.6565246582, 359.84069824219, 359.98901367188, 313.90686035156) -- Infernus
veh[2] = createVehicle(411, -1948.900390625, 402.724609375, 283.65563964844, 359.84069824219, 359.99450683594, 315.42846679688) -- Infernus
veh[3] = createVehicle(411, -1951.462890625, 404.853515625, 283.65716552734, 359.8681640625, 0.0494384765625, 315.68115234375) -- Infernus
veh[4] = createVehicle(411, -1953.9755859375, 407.9462890625, 283.66256713867, 0.0054931640625, 0.142822265625, 317.6806640625) -- Infernus
veh[5] = createVehicle(480, -1959.9599609375, 412.8779296875, 283.70236206055, 359.58251953125, 0, 317.9443359375) -- Comet
veh[6] = createVehicle(480, -1962.751953125, 415.6259765625, 283.70190429688, 359.58251953125, 0, 314.62646484375) -- Comet
veh[7] = createVehicle(480, -1965.1474609375, 417.837890625, 283.70407104492, 359.58801269531, 0, 318.58154296875) -- Comet
veh[8] = createVehicle(480, -1967.796875, 420.3271484375, 283.70440673828, 359.6484375, 0.06591796875, 315.16479492188) -- Comet
veh[9] = createVehicle(477, -1974.025390625, 426.884765625, 283.68572998047, 359.52758789063, 0.0054931640625, 318.11462402344) -- ZR-350
veh[10] = createVehicle(477, -1976.626953125, 429.2802734375, 283.68307495117, 359.5166015625, 0.0164794921875, 315.62622070313) -- ZR-350
veh[11] = createVehicle(477, -1979.1171875, 432.03515625, 283.68518066406, 359.52758789063, 0, 316.98852539063) -- ZR-350
veh[12] = createVehicle(477, -1981.7822265625, 434.283203125, 283.68389892578, 359.54406738281, 0.0274658203125, 314.59350585938) -- ZR-350
veh[13] = createVehicle(409, -1966.6953125, 454.65625, 283.73385620117, 0.0054931640625, 0.10986328125, 317.13684082031) -- Stretch
veh[14] = createVehicle(409, -1954.734375, 467.001953125, 283.73379516602, 0.0054931640625, 0.1812744140625, 319.71313476563) -- Stretch
veh[15] = createVehicle(431, -1941.84765625, 466.650390625, 284.02145385742, 359.40124511719, 0, 225.58227539063) -- Bus
veh[16] = createVehicle(431, -1946.166015625, 464.3271484375, 284.01162719727, 359.36828613281, 359.96154785156, 226.81274414063) -- Bus
veh[17] = createVehicle(437, -1927.6376953125, 453.421875, 284.04791259766, 359.85717773438, 359.99450683594, 226.0107421875) -- Coach
veh[18] = createVehicle(437, -1929.6689453125, 449.2626953125, 284.05017089844, 359.87915039063, 359.93408203125, 225.40100097656) -- Coach
veh[19] = createVehicle(522, -1915.4326171875, 441.6484375, 283.49230957031, 358.74755859375, 359.89013671875, 180.37353515625) -- NRG-500
veh[20] = createVehicle(522, -1913.9931640625, 439.9677734375, 283.49368286133, 358.86291503906, 359.89562988281, 178.17626953125) -- NRG-500
veh[21] = createVehicle(522, -1912.11328125, 438.3271484375, 283.48358154297, 359.01123046875, 359.88464355469, 173.4521484375) -- NRG-500
veh[22] = createVehicle(522, -1910.5615234375, 437.1015625, 283.47778320313, 358.857421875, 359.89013671875, 176.57775878906) -- NRG-500
veh[23] = createVehicle(522, -1908.9892578125, 435.5029296875, 283.47677612305, 359.05517578125, 359.88464355469, 170.40344238281) -- NRG-500
veh[24] = createVehicle(522, -1907.4697265625, 434.4296875, 283.46890258789, 359.06616210938, 359.89013671875, 177.15454101563) -- NRG-500
veh[25] = createVehicle(468, -1906.7138671875, 430.6396484375, 283.5654296875, 0.17578125, 0.142822265625, 59.3701171875) -- Sanchez
veh[26] = createVehicle(468, -1907.45703125, 429.6533203125, 283.56854248047, 0.06591796875, 0.1373291015625, 66.242065429688) -- Sanchez
veh[27] = createVehicle(468, -1908.8720703125, 428.421875, 283.57369995117, 0.2581787109375, 0.142822265625, 62.07275390625) -- Sanchez
veh[28] = createVehicle(468, -1909.88671875, 427.275390625, 283.57778930664, 0.2911376953125, 0.142822265625, 62.677001953125) -- Sanchez
veh[29] = createVehicle(468, -1910.9921875, 426.0693359375, 283.58236694336, 0.4229736328125, 0.1318359375, 66.97265625) -- Sanchez
veh[30] = createVehicle(468, -1912.03125, 424.80078125, 283.58676147461, 0.450439453125, 0.142822265625, 70.576171875) -- Sanchez
veh[31] = createVehicle(468, -1914.205078125, 422.8720703125, 283.59451293945, 0.1318359375, 0.1373291015625, 33.64013671875) -- Sanchez

for v = 1, #veh, 1 do
	setVehicleColor(veh[v], 0, math.random(0, 255), 0, 0, 0, 0)
	setElementData(veh[v], "mv.typ", "Freecar")
	setElementData(veh[v], "mv.besitzer", "-")
	setElementData(veh[v], "mv.stuntcar", "hightjump")
	toggleVehicleRespawn ( veh[v], true )
	setVehicleRespawnDelay ( veh[v], 5000 )
	setVehicleIdleRespawnDelay ( veh[v], IdleCarRespawn*1000*60 )
	giveVehicleBetterEngine(veh[v])
	giveVehiclePanzerung(veh[v])
end

local stunt1 = createColSphere(-1921.9969482422, 412.36651611328, 283.91027832031, 4)
setElementData(stunt1, "ms.stunttype", "start")
local stunt2 = createColSphere(-1747.7124023438, 243.87100219727, 16.798892974854, 5)
setElementData(stunt2, "ms.stunttype", "finish")

addEventHandler("onColShapeHit", stunt1, function(hitElement) setPlayerToStunt(hitElement, "HIGHTJUMP", "Birnen", "5", "all" ) end)
addEventHandler("onColShapeHit", stunt2, function(hitElement) finishPlayerStunt(hitElement, "HIGHTJUMP", "Birnen", "5") end)
