Hello guys, i have a big problem, how can i move a vehicle ( plane ) in the air?
--Aviones
markerPlane = createMarker (3374.5, -1495.5999755859, 10.39999961853, "checkpoint", 20, 0, 0, 900)
local plane1
plane1 = createVehicle(520, 3306.6000976563, -1495.8000488281, 44.700000762939, 0, 0, 269.51831054688)
plane2 = createVehicle(520, 3300.1999511719, -1507.6999511719, 44.700000762939, 0, 0, 269.5166015625)
plane3 = createVehicle(520, 3300.1999511719, -1484.0999755859, 44.700000762939, 0, 0, 269.5166015625)
plane4 = createVehicle(520, 3291.6999511719, -1517.9000244141, 44.7000007629399, 0, 0, 269.5166015625)
plane5 = createVehicle(520, 3292, -1472.9000244141, 44.700000762939, 0, 0, 269.5166015625)
plane6 = createVehicle(520, 3292, -1472.900390625, 44.700000762939, 0, 0, 269.5166015625)
object = createObject (6959, 3473.5, -1496.1999511719, 44.299999237061, 0, 0, 90)
setElementFrozen (plane1, true)
setElementFrozen (plane2, true)
setElementFrozen (plane3, true)
setElementFrozen (plane4, true)
setElementFrozen (plane5, true)
setElementFrozen (plane6, true)
function move1()
if source == markerPlane then
moveObject (plane1, 3473.5, -1496.1999511719, 44.299999237061)
setElementPosition(plane1, 3540.7001953125, -1498.599609375, 15.60000038147)
end
end
addEventHandler ("onMarketHit", resourceRoot, move1)
Because the planes are frozen in the air and do not move, unless the setFrozenElement is disabled (they will not move)
http://i.imgur.com/opDAUab.png
Thanks.