local myMarker = createMarker ( 2579.3999023438, -1894, 3.9000000953674, 'cylinder', 4.0, 0, 0, 255, 150 )
function MarkerHit ( hitElement, matchingDimension )
if ( getElementType ( hitElement ) == 'player' ) then
local teleElement = ( isPedInVehicle ( hitElement ) and getPedOccupiedVehicle ( hitElement ) or hitElement )
setElementPosition ( teleElement, 2574.1999511719, -1784.3000488281, 1.6000000238419 )
end
end
addEventHandler ( "onMarkerHit", myMarker, MarkerHit )
That's an easier way to do it.