I'm trying to make a Script for my [DM](Race) Map. It should make that helicopter takes you to a other spot by moving in the air(like showed in the video), but i can't figure out how to do it
I tried it like that:
local marker2 = createMarker ( 3810.6022949219, -4888.4013671875, 56.759799957275, "corona", 10,0,0,0)
function onMarkerHitt ( thePlayer, matchingDimension )
if thePlayer == getLocalPlayer() then
if source == marker2 then
Copter = createObject( 1318, 3800.6022949219, 4888.4013671875, 56.759799957275, 334, 0, 260 )
setElementInterior ( Copter, 1 )
attachElements ( createVehicle ( 417, 3800.6022949219, 4888.4013671875, 56.759799957275, 334, 0, 260 ), Copter, 0, 0, 0, 0, 0, 0 )
moveObject( Copter, 3100, 3810.6022949219, 4888.4013671875, 56.759799957275, 50, 50, 62 )
end
end
end
addEventHandler ( "onClientMarkerHit", root, onMarkerHitt )
Can someone help me
(If you don't know what i mean, watch this video:
1:00-1:05 I want that the script makes that)Thanks for every help guys!!!