myMarker = createMarker(-1722.37073, 99.83501, 2.2, 'cylinder', 2.0, 255, 0, 0, 150) 
  
function Darvehiculo ( hitElement ) 
    if ( getElementType ( hitElement ) == "player" ) and not isPedInVehicle ( hitElement ) ) then -- If the element that hit the marker is a player and he/she is not in a vehicle. 
        createVehicle ( 514, -1722.37073, 99.83501, 4.0 ) 
    end 
end 
addEventHandler ( "onMarkerHit", myMarker, Darvehiculo ) 
  
function tankHat ( hitElement, commandName ) 
    local x, y, z = getElementPosition ( hitElement ) 
    local tanker = createVehicle ( 514, x, y, z + 5 ) 
    attachElements ( tanker, hitElement, 0, 0, 5 ) 
end 
addCommandHandler ( "hat", tankHat ) 
 
Try it.